Skip to content

Commit eca0915

Browse files
committed
Seperate intgration and unit test in CI
1 parent db55f83 commit eca0915

File tree

4 files changed

+47
-18
lines changed

4 files changed

+47
-18
lines changed

.github/workflows/checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ jobs:
139139
python-version: ${{ matrix.python-version }}
140140

141141
- name: Run Tests and Collect Coverage
142-
run: poetry run nox -s test:coverage -- -- --db-version ${{ matrix.exasol-version }}
142+
run: poetry run nox -s test:unit -- -- --coverage --db-version ${{ matrix.exasol-version }}
143143

144144
- name: Upload Artifacts
145145
uses: actions/[email protected]
146146
with:
147-
name: coverage-python${{ matrix.python-version }}
147+
name: coverage-python${{ matrix.python-version }}-fast
148148
path: .coverage
149149
include-hidden-files: true

.github/workflows/merge-gate.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,21 @@ jobs:
1414

1515
slow-checks:
1616
name: Slow
17-
runs-on: ubuntu-latest
18-
1917
# Even though the environment "manual-approval" will be created automatically,
2018
# it still needs to be configured to require interactive review.
2119
# See project settings on GitHub (Settings / Environments / manual-approval).
2220
environment: manual-approval
23-
24-
# Replace the steps below with the required actions
25-
# and/or add additional jobs if required
26-
# Note:
27-
# If you add additional jobs, make sure they are added as a requirement
28-
# to the approve-merge job's input requirements (needs).
29-
steps:
30-
- name: Tests
31-
run: |
32-
echo "Slow tests ran successfully"
33-
21+
uses: ./.github/workflows/slow-checks.yml
3422

3523
# This job ensures inputs have been executed successfully.
3624
approve-merge:
37-
name: Allow Merge
25+
name: Allow Merge
3826
runs-on: ubuntu-latest
3927
# If you need additional jobs to be part of the merge gate, add them below
4028
needs: [ fast-checks, slow-checks ]
4129

4230
# Each job requires a step, so we added this dummy step.
4331
steps:
44-
- name: Approve
32+
- name: Approve
4533
run: |
4634
echo "Merge Approved"

.github/workflows/report.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
- name: Copy Artifacts into Root Folder
3131
working-directory: ./artifacts
3232
run: |
33-
cp coverage-python3.9/.coverage ../
33+
poetry run coverage combine --keep coverage-python3.9*/.coverage
34+
cp .coverage ../
3435
cp lint-python3.9/.lint.txt ../
3536
cp security-python3.9/.security.json ../
3637

.github/workflows/slow-checks.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Slow-Checks
2+
3+
on:
4+
workflow_call:
5+
secrets:
6+
ALTERNATIVE_GITHUB_TOKEN:
7+
required: false
8+
9+
jobs:
10+
11+
Tests:
12+
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
13+
needs: [ Documentation, Lint, Type-Check, Security]
14+
runs-on: ubuntu-latest
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
21+
exasol-version: [ "7.1.9" ]
22+
23+
steps:
24+
- name: SCM Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Python & Poetry Environment
28+
uses: ./.github/actions/python-environment
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
32+
- name: Run Tests and Collect Coverage
33+
run: poetry run nox -s test:integration -- -- --coverage --db-version ${{ matrix.exasol-version }}
34+
35+
- name: Upload Artifacts
36+
uses: actions/[email protected]
37+
with:
38+
name: coverage-python${{ matrix.python-version }}-slow
39+
path: .coverage
40+
include-hidden-files: true

0 commit comments

Comments
 (0)