Skip to content

Commit 9cb7a75

Browse files
authored
Add CI checks (#2)
1 parent 3ba59eb commit 9cb7a75

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
12+
jobs:
13+
test:
14+
strategy:
15+
max-parallel: 5
16+
matrix:
17+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
18+
os: [ubuntu-latest, windows-latest, macos-latest]
19+
# Just to slim down the test matrix:
20+
exclude:
21+
- python-version: 3.8
22+
os: macos-latest
23+
- python-version: 3.8
24+
os: windows-latest
25+
- python-version: 3.9
26+
os: ubuntu-latest
27+
- python-version: 3.10
28+
os: macos-latest
29+
- python-version: 3.10
30+
os: windows-latest
31+
runs-on: ${{ matrix.os }}
32+
steps:
33+
- uses: actions/checkout@v3
34+
- name: Setup Python ${{ matrix.python-version }}
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
- name: Install dependencies
39+
run: |
40+
python -m pip install --upgrade hatch
41+
- name: Run tests
42+
run: |
43+
hatch run +py=${{ matrix.py || matrix.python-version }} test:test
44+
shell: bash
45+
46+
lint:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v3
50+
- name: Setup Python
51+
uses: actions/setup-python@v4
52+
with:
53+
python-version: '3.11'
54+
- name: Install Python dependencies
55+
run: |
56+
python -m pip install --upgrade hatch
57+
- name: Check style
58+
if: always()
59+
run: hatch run style:check

0 commit comments

Comments
 (0)