Initial preparation for supporting writing to any/all cdf targets #596
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test extractor | |
on: | |
pull_request: | |
branches: [ master ] | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build ExtractorLauncher/ | |
- name: Install test dependencies | |
run: "sudo apt-get update && sudo apt-get -y install gnupg curl procps && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && sudo apt-get install -y mosquitto" | |
- name: Setup mosquitto | |
run: mosquitto -p 4060 & | |
- name: Setup influxdb | |
run: sh setup-influxdb.sh | |
- name: Run tests | |
run: sh test.sh | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verify-schema: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install extractor uploader | |
env: | |
PYPI_ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_READONLY_TOKEN_USER_PUBLIC_REPOS }} | |
PYPI_ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_READONLY_TOKEN_PUBLIC_REPOS }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install cognite-extractor-publisher --extra-index-url "https://${PYPI_ARTIFACTORY_USERNAME}:${PYPI_ARTIFACTORY_PASSWORD}@cognite.jfrog.io/cognite/api/pypi/snakepit/simple" | |
- name: Verify manifest | |
run: | | |
publish-extractor validate --manifest manifest.yml --config-files Test/config.test.yml |