prepared pytest-slc release 0.4.3 and other stuff #2
Workflow file for this run
This file contains hidden or 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: CI | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| slow-tests: | ||
| type: boolean | ||
| required: false | ||
| default: false | ||
| secrets: | ||
| ALTERNATIVE_GITHUB_TOKEN: | ||
| required: false | ||
| jobs: | ||
| set-project-matrix: | ||
| name: Set Project Matrix | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - id: set-matrix | ||
| run: | | ||
| echo "matrix={\"working-directory\": [\"pytest-backend\", \"pytest-extension\", \"pytest-slc\"]}" >> "$GITHUB_OUTPUT" | ||
| outputs: | ||
| matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
| fast-checks: | ||
| name: Fast | ||
| uses: ./.github/workflows/checks.yml | ||
| needs: [ set-project-matrix ] | ||
| strategy: | ||
| matrix: ${{ fromJson(needs.set-project-matrix.outputs.matrix) }} | ||
| permissions: | ||
| contents: read | ||
| with: | ||
| working-directory: ${{ matrix.working-directory }} | ||
| slow-test-detection: | ||
| name: Run Slow or Expensive Tests? | ||
| runs-on: ubuntu-24.04 | ||
| needs: [ fast-checks ] | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Detect Slow Tests | ||
| run: true | ||
| environment: | ||
| manual-environment | ||
| slow-tests: | ||
| name: Slow Tests (${{ matrix.working-directory }}) | ||
| runs-on: ubuntu-24.04 | ||
| needs: [ set-project-matrix, slow-test-detection ] | ||
| strategy: | ||
| matrix: ${{ fromJson(needs.set-project-matrix.outputs.matrix) }} | ||
| permissions: | ||
| contents: read | ||
| defaults: | ||
| run: | ||
| working-directory: ${{ matrix.working-directory }} | ||
| steps: | ||
| - name: Set pytest markers | ||
| id: pytest-markers | ||
| if: ${{ ! inputs.slow-tests }} | ||
| run: echo slow-tests='-m "not slow"' >> "$GITHUB_OUTPUT" | ||
| - name: SCM Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Setup Python & Poetry Environment | ||
| uses: exasol/python-toolbox/.github/actions/python-environment@v3 | ||
| with: | ||
| working-directory: ${{ matrix.working-directory }} | ||
| - name: Allow unprivileged user namespaces | ||
| run: | | ||
| sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | ||
| - name: Run slow tests | ||
| run: poetry run -- nox -s test:integration -- --coverage | ||
| env: | ||
| SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }} | ||
| SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }} | ||
| SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }} | ||
| PYTEST_ADDOPTS: '${{ steps.pytest-markers.outputs.slow-tests }}' | ||
| - name: Upload Artifacts | ||
| uses: actions/upload-artifact@v5 | ||
| with: | ||
| name: coverage-${{ matrix.working-directory }}-python${{ matrix.python-version }}-slow | ||
| path: ${{ matrix.working-directory }}/.coverage | ||
| include-hidden-files: true | ||
| merge-gate: | ||
| name: Merge Gate | ||
| needs: [ fast-checks, slow-tests ] | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| contents: read | ||
| metrics: | ||
| needs: [ set-project-matrix, fast-checks, slow-tests ] | ||
| strategy: | ||
| matrix: ${{ fromJson(needs.set-project-matrix.outputs.matrix) }} | ||
| uses: ./.github/workflows/report.yml | ||
| secrets: inherit | ||
| permissions: | ||
| contents: read | ||
| with: | ||
| working-directory: ${{ matrix.working-directory }} | ||