-
Notifications
You must be signed in to change notification settings - Fork 51
75 lines (59 loc) · 1.84 KB
/
Copy pathcheck.yml
File metadata and controls
75 lines (59 loc) · 1.84 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
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
name: Run linters and tests
on:
push:
pull_request:
permissions:
pull-requests: read
env:
API_KEY: ${{ secrets.API_KEY }}
API_SECRET: ${{ secrets.API_SECRET }}
AFFILIATE_TAG: ${{ secrets.AFFILIATE_TAG }}
COUNTRY_CODE: ${{ secrets.COUNTRY_CODE }}
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install UV
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Cache UV dependencies
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Cache pre-commit
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pre-commit-
- name: Run all checks
run: |
SKIP=test uv run pre-commit run --all-files
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
steps:
- uses: actions/checkout@v5
- name: Install UV
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Cache UV dependencies
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-py${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-uv-py${{ matrix.python-version }}-
- name: Run tests
run: uv run --python "${{ matrix.python-version }}" pytest -rs --no-cov