Debian Codegraph @

.github/workflows/tests.yml

raw symbols SCIP
1 name: Tests
2
3 on:
4 schedule:
5 - cron: "10 16 * * 3"
6 pull_request:
7 branches: [ master ]
8 push:
9 branches: [ master ]
10 workflow_dispatch:
11
12 jobs:
13
14 ubuntu-system-python:
15 name: ${{ matrix.os }}-system-python
16 runs-on: ${{ matrix.os }}
17 strategy:
18 fail-fast: false
19 matrix:
20 os: [ubuntu-22.04, ubuntu-24.04]
21 steps:
22 - uses: actions/checkout@v6
23 - name: Install System Python
24 run: |
25 sudo apt install python3-dev python3-pip python3-venv
26 - name: Build venv
27 run: |
28 python -m venv .venv
29 . .venv/bin/activate
30 echo PATH=$PATH >> $GITHUB_ENV
31 - name: Install Testing Requirements
32 run: python3 -m pip install nox
33 - name: Run Tests
34 run: python3 -m nox -e tests
35 - name: Upload to codecov
36 uses: codecov/codecov-action@v5
37 with:
38 token: ${{ secrets.CODECOV_TOKEN }}
39 fail_ci_if_error: true
40
41 setup-python:
42 name: ${{ matrix.os }}-setup-python
43 runs-on: ${{ matrix.os }}
44 strategy:
45 fail-fast: false
46 matrix:
47 os: [windows-latest, macos-latest, ubuntu-latest]
48 steps:
49 - name: Checkout project
50 uses: actions/checkout@v6
51 - name: Install Python
52 uses: actions/setup-python@v6
53 with:
54 python-version: '3.x'
55 - name: Install Testing Requirements
56 run: python -m pip install nox
57 - name: Run tests
58 run: python -m nox -e tests
59 - name: Upload to codecov
60 uses: codecov/codecov-action@v5
61 with:
62 token: ${{ secrets.CODECOV_TOKEN }}
63 fail_ci_if_error: true
64
65 anaconda:
66 name: ${{ matrix.os }}-anaconda
67 runs-on: ${{ matrix.os }}
68 defaults:
69 run:
70 shell: bash -l {0} # setup-miniconda requires using login bash shells to activate env
71 strategy:
72 fail-fast: false
73 matrix:
74 os: [ubuntu-latest, windows-latest, macos-latest]
75 steps:
76 - uses: actions/checkout@v6
77 - uses: conda-incubator/setup-miniconda@v3
78 with:
79 auto-update-conda: true
80 auto-activate-base: true
81 activate-environment: ''
82 - name: Install Testing Requirements
83 run: python -m pip install nox
84 - name: Run Tests
85 run: python -m nox -e tests
86 - name: Upload to codecov
87 uses: codecov/codecov-action@v5
88 with:
89 token: ${{ secrets.CODECOV_TOKEN }}
90 fail_ci_if_error: true
91
92 rhel9-system-python:
93 name: rhel9-system-python
94 runs-on: ubuntu-latest
95 container: "almalinux:9"
96 steps:
97 - name: Install System Python and Git
98 run: yum install -y python3-devel python3-pip python3 git
99 - uses: actions/checkout@v6
100 - name: Install Testing Requirements
101 run: python3 -m pip install nox
102 - name: Run Tests
103 run: python3 -m nox -e tests
104 - name: Upload to codecov
105 uses: codecov/codecov-action@v5
106 with:
107 token: ${{ secrets.CODECOV_TOKEN }}
108 fail_ci_if_error: true
109
110 msys:
111 name: ${{ matrix.msystem }}-system-python
112 runs-on: windows-latest
113 defaults:
114 run:
115 shell: msys2 {0}
116 strategy:
117 fail-fast: false
118 matrix:
119 msystem:
120 - MSYS
121 - MINGW32
122 - MINGW64
123 - UCRT64
124 steps:
125 - name: Install msys2
126 uses: msys2/setup-msys2@v2
127 with:
128 msystem: ${{ matrix.msystem }}
129 pacboy: >-
130 gnupg
131 python:p
132 python-pip:p
133 update: true
134 - uses: actions/checkout@v6
135 - name: Run tests
136 run: |
137 python -m venv .venv
138 . .venv/bin/activate
139 pip install nox
140 nox -e tests
141 - name: Upload to codecov
142 uses: codecov/codecov-action@v5
143 with:
144 token: ${{ secrets.CODECOV_TOKEN }}
145 fail_ci_if_error: true
146
147 alpine:
148 name: alpine-system-python
149 runs-on: ubuntu-latest
150 container: "alpine:latest"
151 steps:
152 - name: Update Packages
153 run: |
154 apk update
155 apk upgrade
156 - name: Install Testing and Coverage Upload Dependencies
157 run: |
158 apk add python3 python3-dev py3-pip py3-nox py3-attrs git
159 apk add bash gpg curl
160 - name: Download Source
161 uses: actions/checkout@v6
162 - name: Run Tests
163 run: |
164 nox -e tests
165 - name: Upload to codecov
166 uses: codecov/codecov-action@v5
167 with:
168 token: ${{ secrets.CODECOV_TOKEN }}
169 fail_ci_if_error: true
170
171 homebrew:
172 name: homebrew-system-python
173 runs-on: macos-latest
174 steps:
175 - name: Install System Python and Git
176 run: |
177 brew install python git
178 - name: Download Source
179 uses: actions/checkout@v6
180 - name: Build venv
181 run: |
182 python3 -m venv .venv
183 . .venv/bin/activate
184 echo PATH=$PATH >> $GITHUB_ENV
185 - name: Install Testing Requirements
186 run: |
187 python3 -m pip install nox
188 - name: Run Tests
189 run: |
190 python3 -m nox -e tests
191 - name: Upload to codecov
192 uses: codecov/codecov-action@v5
193 with:
194 token: ${{ secrets.CODECOV_TOKEN }}
195 fail_ci_if_error: true
196
197 archlinux:
198 name: archlinux-system-python
199 runs-on: ubuntu-latest
200 container:
201 image: archlinux
202 options: --privileged
203 steps:
204 - name: Install System Python and Git
205 run: |
206 pacman --noconfirm -Sy python python-pip git
207 - name: Download Source
208 uses: actions/checkout@v6
209 - name: Create and activate environment
210 run: |
211 python -m venv .venv
212 . .venv/bin/activate
213 echo PATH=$PATH >> $GITHUB_ENV
214 - name: Install Testing Requirements
215 run: |
216 pip install nox
217 - name: Run Tests
218 run: |
219 nox -e tests
220 - name: Upload to codecov
221 uses: codecov/codecov-action@v5
222 with:
223 token: ${{ secrets.CODECOV_TOKEN }}
224 fail_ci_if_error: true
225
226 concurrency:
227 group: ${{ github.workflow }}-${{ github.ref }}
228 cancel-in-progress: ${{ contains(github.ref, 'master') }}