forked from exasol/bucketfs-utils-python
-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (75 loc) · 2.27 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: CI
on:
pull_request:
schedule:
# “At 00:00 on every 7th day-of-month from 1 through 31.” (https://crontab.guru)
- cron: "0 0 1/7 * *"
jobs:
ci-job:
name: Checks
uses: ./.github/workflows/checks.yml
fast-tests:
name: Tests (Python-${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
poetry-version: 1.2.2
- name: Run Unit Tests
run: poetry run nox -s test:unit
- name: Run Legacy Tests
run: poetry run pytest --backend=onprem test_legacy
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: .coverage
path: .coverage
metrics:
needs: [ fast-tests ]
uses: ./.github/workflows/report.yml
gate-1:
name: Gate 1 - Regular CI
needs: [ fast-tests ]
runs-on: ubuntu-latest
steps:
- name: Branch Protection
run: true
slow-test-detection:
name: Run Slow or Expensive Tests (e.g. SaaS)?
runs-on: ubuntu-latest
steps:
- name: Detect Slow Tests
run: true
environment:
slow-tests
run-slow-tests:
name: Run Slow or Expensive Tests (e.g. SaaS) if Requested
runs-on: ubuntu-latest
needs: [ slow-test-detection ]
steps:
- uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
python-version: "3.10"
poetry-version: "1.2.2"
- name: Run Integration Tests
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 }}
run: poetry run pytest --backend=onprem test/integration
gate-2:
name: Gate 2 - Allow Merge
runs-on: ubuntu-latest
needs: [ run-slow-tests ]
steps:
- name: Branch Protection
run: true