diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 86460afd1..62172df60 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -139,11 +139,11 @@ jobs: python-version: ${{ matrix.python-version }} - name: Run Tests and Collect Coverage - run: poetry run nox -s test:coverage -- -- --db-version ${{ matrix.exasol-version }} + run: poetry run nox -s test:unit -- -- --coverage --db-version ${{ matrix.exasol-version }} - name: Upload Artifacts uses: actions/upload-artifact@v4.4.0 with: - name: coverage-python${{ matrix.python-version }} + name: coverage-python${{ matrix.python-version }}-fast path: .coverage include-hidden-files: true diff --git a/.github/workflows/merge-gate.yml b/.github/workflows/merge-gate.yml index 1f9f949c7..46ad5abed 100644 --- a/.github/workflows/merge-gate.yml +++ b/.github/workflows/merge-gate.yml @@ -14,33 +14,21 @@ jobs: slow-checks: name: Slow - runs-on: ubuntu-latest - # Even though the environment "manual-approval" will be created automatically, # it still needs to be configured to require interactive review. # See project settings on GitHub (Settings / Environments / manual-approval). environment: manual-approval - - # Replace the steps below with the required actions - # and/or add additional jobs if required - # Note: - # If you add additional jobs, make sure they are added as a requirement - # to the approve-merge job's input requirements (needs). - steps: - - name: Tests - run: | - echo "Slow tests ran successfully" - + uses: ./.github/workflows/slow-checks.yml # This job ensures inputs have been executed successfully. approve-merge: - name: Allow Merge + name: Allow Merge runs-on: ubuntu-latest # If you need additional jobs to be part of the merge gate, add them below needs: [ fast-checks, slow-checks ] # Each job requires a step, so we added this dummy step. steps: - - name: Approve + - name: Approve run: | echo "Merge Approved" diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index 7c1ebe45d..f37e6a89e 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -30,7 +30,8 @@ jobs: - name: Copy Artifacts into Root Folder working-directory: ./artifacts run: | - cp coverage-python3.9/.coverage ../ + poetry run coverage combine --keep coverage-python3.9*/.coverage + cp .coverage ../ cp lint-python3.9/.lint.txt ../ cp security-python3.9/.security.json ../ diff --git a/.github/workflows/slow-checks.yml b/.github/workflows/slow-checks.yml new file mode 100644 index 000000000..8ee3ec982 --- /dev/null +++ b/.github/workflows/slow-checks.yml @@ -0,0 +1,40 @@ +name: Slow-Checks + +on: + workflow_call: + secrets: + ALTERNATIVE_GITHUB_TOKEN: + required: false + +jobs: + + Tests: + name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}}) + needs: [ Documentation, Lint, Type-Check, Security] + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + strategy: + fail-fast: false + matrix: + python-version: [ "3.9", "3.10", "3.11", "3.12" ] + exasol-version: [ "7.1.9" ] + + steps: + - name: SCM Checkout + uses: actions/checkout@v4 + + - name: Setup Python & Poetry Environment + uses: ./.github/actions/python-environment + with: + python-version: ${{ matrix.python-version }} + + - name: Run Tests and Collect Coverage + run: poetry run nox -s test:integration -- -- --coverage --db-version ${{ matrix.exasol-version }} + + - name: Upload Artifacts + uses: actions/upload-artifact@v4.4.0 + with: + name: coverage-python${{ matrix.python-version }}-slow + path: .coverage + include-hidden-files: true