Skip to content

Commit 38bac1a

Browse files
committed
Migrate to Github Actions
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
1 parent f417f6e commit 38bac1a

File tree

2 files changed

+107
-93
lines changed

2 files changed

+107
-93
lines changed

.circleci/config.yml

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

.github/workflows/ci.yaml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
8+
jobs:
9+
flake8_lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Python
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.9'
17+
- name: Install tox
18+
run: pip install tox
19+
- name: Run flake8
20+
run: tox -e flake8
21+
22+
isort_lint:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.9'
30+
- name: Install tox
31+
run: pip install tox
32+
- name: Run isort
33+
run: tox -e isort
34+
35+
mypy_lint:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Set up Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: '3.9'
43+
- name: Install tox
44+
run: pip install tox
45+
- name: Run mypy
46+
run: tox -e mypy
47+
48+
test:
49+
runs-on: ubuntu-latest
50+
strategy:
51+
matrix:
52+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
53+
steps:
54+
- uses: actions/checkout@v4
55+
- name: Set up Python ${{ matrix.python-version }}
56+
uses: actions/setup-python@v5
57+
with:
58+
python-version: ${{ matrix.python-version }}
59+
- name: Install dependencies
60+
run: |
61+
pip install --user tox "virtualenv<20.22.0"
62+
echo "$HOME/.local/bin" >> $GITHUB_PATH
63+
- name: Set tox environment
64+
id: toxenv
65+
run: |
66+
VERSION="${{ matrix.python-version }}"
67+
# Extract major.minor version (strip patch if present)
68+
TOX_VERSION=$(echo "$VERSION" | cut -d. -f1,2)
69+
echo "toxenv=py${TOX_VERSION}" >> $GITHUB_OUTPUT
70+
- name: Run tests
71+
run: tox
72+
env:
73+
TOXENV: ${{ steps.toxenv.outputs.toxenv }}
74+
75+
test_nooptionals:
76+
runs-on: ubuntu-latest
77+
env:
78+
PYTHON_VERSION: '3.9'
79+
steps:
80+
- uses: actions/checkout@v4
81+
- name: Set up Python
82+
uses: actions/setup-python@v5
83+
with:
84+
python-version: ${{ env.PYTHON_VERSION }}
85+
- name: Install tox
86+
run: pip install tox
87+
- name: Run tests without optional dependencies
88+
run: tox
89+
env:
90+
TOXENV: py${{ env.PYTHON_VERSION }}-nooptionals
91+
92+
test_pypy:
93+
runs-on: ubuntu-latest
94+
env:
95+
PYTHON_VERSION: '3.9'
96+
steps:
97+
- uses: actions/checkout@v4
98+
- name: Set up PyPy
99+
uses: actions/setup-python@v5
100+
with:
101+
python-version: pypy-${{ env.PYTHON_VERSION }}
102+
- name: Install tox
103+
run: pip install tox
104+
- name: Run tests with PyPy
105+
run: tox
106+
env:
107+
TOXENV: pypy${{ env.PYTHON_VERSION }}

0 commit comments

Comments
 (0)