diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 2dc8cd8c..0e0b71d5 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -11,29 +11,6 @@ on: jobs: - detect-change-scope: - runs-on: ubuntu-latest - permissions: - pull-requests: read - outputs: - etl: ${{ steps.filter.outputs.etl }} - api: ${{ steps.filter.outputs.api }} - etl_tests: ${{ steps.filter.outputs.etl_tests }} - api_tests: ${{ steps.filter.outputs.api_tests }} - steps: - - uses: dorny/paths-filter@v3.0.2 - id: filter - with: - filters: | - etl: - - 'air-quality-backend/src/etl/**' - api: - - 'air-quality-backend/src/api/**' - etl_tests: - - 'air-quality-backend/tests/etl_tests/**' - api_tests: - - 'air-quality-backend/tests/api_tests/**' - run-lint: runs-on: ubuntu-latest defaults: @@ -54,58 +31,3 @@ jobs: - name: Run lint check run: python -m flake8 --append-config air-quality-backend/.flake8 air-quality-backend - etl: - needs: detect-change-scope - if: ${{ needs.detect-change-scope.outputs.etl == 'true' || needs.detect-change-scope.outputs.etl_tests == 'true' }} - runs-on: ubuntu-latest - defaults: - run: - shell: bash -el {0} - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup miniconda - uses: conda-incubator/setup-miniconda@v3 - with: - channels: conda-forge - environment-file: air-quality-backend/conda/etl_environment.yml - auto-activate-base: false - activate-environment: etl-dev - - - name: Run etl unit tests - run: python -m pytest --cov=src --cov=scripts --cov-report=xml:air-quality-backend/tests/coverage/etl_test_report.xml air-quality-backend/tests/etl_tests - - - name: Code Coverage Report - uses: orgoro/coverage@v3.1 - with: - coverageFile: air-quality-backend/tests/coverage/etl_test_report.xml - token: ${{ secrets.GITHUB_TOKEN }} - - api: - needs: detect-change-scope - if: ${{ needs.detect-change-scope.outputs.api == 'true' }} - runs-on: ubuntu-latest - defaults: - run: - shell: bash -el {0} - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup miniconda - uses: conda-incubator/setup-miniconda@v3 - with: - channels: conda-forge - environment-file: air-quality-backend/conda/api_environment.yml - auto-activate-base: false - activate-environment: api-dev - - - name: Run api unit tests - run: python -m pytest --cov=src --cov=scripts --cov-report=xml:air-quality-backend/tests/coverage/api_test_report.xml air-quality-backend/tests/api_tests - - - name: Code Coverage Report - uses: orgoro/coverage@v3.1 - with: - coverageFile: air-quality-backend/tests/coverage/api_test_report.xml - token: ${{ secrets.GITHUB_TOKEN }}