-
Notifications
You must be signed in to change notification settings - Fork 142
95 lines (82 loc) · 2.74 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
93
94
95
# .github/workflows/test.yml
name: continuous-integration
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
permissions:
contents: read
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.8'
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
sanity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.8'
- run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install invoke
- run: invoke build.build-package
- run: invoke sanity.validate-sdist
- run: invoke sanity.validate-wheel
ci:
needs: [pre-commit, sanity]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.8'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- run: invoke build.install-package
- run: invoke test.type-check
- run: invoke integration.clean
- run: invoke integration.version
- run: invoke integration.initialize
- run: invoke unit.pytest
- run: invoke integration.query
- run: invoke integration.write-policy
python-version:
needs: [pre-commit, sanity]
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: true
matrix:
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- run: invoke build.install-package
- run: invoke integration.clean
- run: invoke integration.version
- run: invoke integration.initialize
- run: invoke unit.pytest
- run: invoke integration.query
- run: invoke integration.write-policy