-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (40 loc) · 1.06 KB
/
python-tests.yml
File metadata and controls
49 lines (40 loc) · 1.06 KB
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
name: Python tests
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
with:
python-version: "${{matrix.python-version}}"
cache: "pip"
- name: Install Hatch
run: pip install --user --upgrade hatch
- name: Run type check
run: hatch run types:check
- name: Run pre-commit
run: hatch run pre-commit run --all
env:
SKIP: nitpick
- name: Run tests
run: hatch test --python ${{ matrix.python-version }} --cover --randomize --retries 2 --retry-delay 1