-
-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (80 loc) · 1.93 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
name: CI
on:
push:
pull_request:
schedule:
- cron: '0 6 * * 6'
defaults:
run:
shell: bash
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- python: '^3.12'
os: ubuntu-latest
- python: '3.12'
os: macos-latest
- python: '3.11'
os: windows-latest
- python: '3.10'
os: ubuntu-latest
- python: '3.9'
os: macos-latest
- python: '3.8'
os: windows-latest
- python: '3.8'
os: ubuntu-latest
versions: minimal
runs-on: ${{matrix.os}}
steps:
- name: Download source
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python}}
- name: Pin to lowest versions
if: matrix.versions == 'minimal'
run: |
sed -i -E 's/#min //; s/\b >=([0-9])/ ==\1/' pyproject.toml
- name: Install Hatch
run: |
pip install hatch
- name: Install dependencies
run: |
hatch run test:pip freeze
- name: Run tests
run: |
hatch run test:test
style:
runs-on: ubuntu-latest
steps:
- name: Download source
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install Hatch
run: |
pip install hatch
- name: Install dependencies
run: |
hatch run style:pip freeze
hatch run types:pip freeze
- name: Check style
if: always()
run: |
hatch run style:fix
- name: Check formatting
if: always()
run: |
hatch run style:format
git diff --color --exit-code
- name: Check types
if: always()
run: |
hatch run types:check