Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 03c9eb0

Browse files
authoredApr 25, 2025··
Merge pull request #231 from EliahKagan/ci
Fix CI and consolidate jobs into fewer workflows
2 parents 1329f98 + 90146fd commit 03c9eb0

File tree

8 files changed

+203
-256
lines changed

8 files changed

+203
-256
lines changed
 

‎.github/dependabot.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "pip"
4-
directory: "/"
3+
- package-ecosystem: pip
4+
directory: '/'
55
schedule:
6-
interval: "monthly"
6+
interval: monthly
77
allow:
8-
- dependency-type: "all"
9-
open-pull-requests-limit: 20
8+
- dependency-type: all
109
groups:
1110
python-dependencies:
1211
patterns: ['*']
1312

14-
- package-ecosystem: "github-actions"
15-
directory: "/"
13+
- package-ecosystem: github-actions
14+
directory: '/'
1615
schedule:
17-
interval: "daily"
16+
interval: daily
17+
groups:
18+
github-actions:
19+
patterns: ['*']

‎.github/workflows/codeql.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

‎.github/workflows/flake8.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎.github/workflows/pytest-conda.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

‎.github/workflows/pytest-pipenv-lock.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

‎.github/workflows/pytest-pipenv.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

‎.github/workflows/shellcheck.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎.github/workflows/test.yml

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
pytest-conda:
7+
name: pytest (conda)
8+
9+
strategy:
10+
matrix:
11+
os:
12+
- ubuntu-latest
13+
- macos-latest
14+
- windows-latest
15+
python-version:
16+
# - '3.13t'
17+
- '3.13'
18+
- '3.12'
19+
- '3.11'
20+
- '3.10'
21+
- '3.9'
22+
- '3.8'
23+
- '3.7'
24+
exclude:
25+
- os: macos-latest
26+
python-version: '3.7'
27+
28+
runs-on: ${{ matrix.os }}
29+
30+
defaults:
31+
run:
32+
shell: bash -l {0}
33+
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@v4
37+
38+
- name: Substitute Python version
39+
run: |
40+
perl -i -spwe 's/^ *- python=\K.+$/$pyver/' -- \
41+
-pyver=${{ matrix.python-version }} environment.yml
42+
43+
- name: Set up micromamba
44+
uses: mamba-org/setup-micromamba@v1
45+
with:
46+
environment-file: environment.yml
47+
48+
- name: Run all tests
49+
run: pytest --doctest-modules
50+
timeout-minutes: 2
51+
52+
pytest-pipenv-lock:
53+
name: pytest (Pipfile.lock)
54+
55+
strategy:
56+
matrix:
57+
os:
58+
- ubuntu-latest
59+
- macos-latest
60+
- windows-latest
61+
62+
runs-on: ${{ matrix.os }}
63+
64+
steps:
65+
- name: Checkout repository
66+
uses: actions/checkout@v4
67+
68+
- name: Set up Python
69+
uses: actions/setup-python@v5
70+
with:
71+
python-version: 3.11
72+
73+
- name: Upgrade PyPA packages
74+
run: python -m pip install -U pip setuptools wheel
75+
76+
- name: Install pipenv
77+
run: pip install pipenv
78+
79+
- name: Install project with all dependencies
80+
run: pipenv install -d
81+
82+
- name: Run all tests
83+
run: pipenv run pytest --doctest-modules
84+
timeout-minutes: 2
85+
86+
pytest-pipenv:
87+
name: pytest (Pipfile)
88+
89+
strategy:
90+
matrix:
91+
os:
92+
- ubuntu-latest
93+
- ubuntu-22.04
94+
- macos-latest
95+
# - windows-latest
96+
python-version:
97+
# - '3.13t'
98+
- '3.13'
99+
- '3.12'
100+
- '3.11'
101+
- '3.10'
102+
- '3.9'
103+
- '3.8'
104+
- '3.7'
105+
exclude:
106+
# Don't test Python 3.7 on Ubuntu >= 24.04 LTS.
107+
- os: ubuntu-latest
108+
python-version: '3.7'
109+
# Only test Python 3.7 on Ubuntu 22.04 LTS.
110+
- os: ubuntu-22.04
111+
python-version: '3.13'
112+
- os: ubuntu-22.04
113+
python-version: '3.12'
114+
- os: ubuntu-22.04
115+
python-version: '3.11'
116+
- os: ubuntu-22.04
117+
python-version: '3.10'
118+
- os: ubuntu-22.04
119+
python-version: '3.9'
120+
- os: ubuntu-22.04
121+
python-version: '3.8'
122+
# Don't test Python 3.7 on macOS.
123+
- os: macos-latest
124+
python-version: '3.7'
125+
126+
runs-on: ${{ matrix.os }}
127+
128+
defaults:
129+
run:
130+
shell: bash
131+
132+
steps:
133+
- name: Checkout repository
134+
uses: actions/checkout@v4
135+
136+
- name: Remove Pipfile.lock
137+
run: rm Pipfile.lock
138+
139+
- name: Drop full Python version
140+
run: |
141+
perl -i -nwe 'print unless /^python_full_version = "[^"]+"$/' Pipfile
142+
143+
- name: Substitute Python version
144+
run: |
145+
perl -i -spwe 's/^python_version = "\K[^"]+(?="$)/$pyver/' -- \
146+
-pyver=${{ matrix.python-version }} Pipfile
147+
148+
- name: Set up Python
149+
uses: actions/setup-python@v5
150+
with:
151+
python-version: ${{ matrix.python-version }}
152+
153+
- name: Upgrade PyPA packages
154+
run: python -m pip install -U pip setuptools wheel
155+
156+
- name: Install pipenv
157+
run: pip install pipenv
158+
159+
- name: Install project with all dependencies
160+
run: pipenv install -d
161+
162+
- name: Run all tests
163+
run: pipenv run pytest --doctest-modules
164+
timeout-minutes: 2
165+
166+
lint:
167+
name: Lint (flake8)
168+
169+
runs-on: ubuntu-latest
170+
171+
steps:
172+
- name: Check out source repository
173+
uses: actions/checkout@v4
174+
175+
- name: Set up Python environment
176+
uses: actions/setup-python@v5
177+
with:
178+
python-version: '3.11'
179+
180+
- name: flake8 Lint
181+
uses: py-actions/flake8@v2
182+
183+
shellcheck:
184+
name: ShellCheck
185+
186+
runs-on: ubuntu-latest
187+
188+
steps:
189+
- name: Check out source repository
190+
uses: actions/checkout@v4
191+
192+
- name: Analyze shell scripts
193+
uses: bewuethr/shellcheck-action@v2

0 commit comments

Comments
 (0)
Please sign in to comment.