-
Notifications
You must be signed in to change notification settings - Fork 47
97 lines (80 loc) · 2.6 KB
/
check.yml
File metadata and controls
97 lines (80 loc) · 2.6 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Run linters and tests
on:
push:
branches:
- master
pull_request:
permissions:
pull-requests: read
jobs:
changelog:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Check CHANGELOG was updated
run: |
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^CHANGELOG.md$"; then
echo "✅ CHANGELOG.md was updated"
else
echo "❌ ERROR: CHANGELOG.md was not updated"
echo "Please add your changes to the CHANGELOG.md file"
exit 1
fi
check:
runs-on: ubuntu-latest
env:
API_KEY: ${{ secrets.API_KEY }}
API_SECRET: ${{ secrets.API_SECRET }}
AFFILIATE_TAG: ${{ secrets.AFFILIATE_TAG }}
COUNTRY_CODE: ${{ secrets.COUNTRY_CODE }}
CREDENTIAL_ID: ${{ secrets.CREDENTIAL_ID }}
CREDENTIAL_SECRET: ${{ secrets.CREDENTIAL_SECRET }}
API_VERSION: ${{ secrets.API_VERSION }}
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: |
uv run --extra async pre-commit run --all-files --verbose
test:
runs-on: ubuntu-latest
timeout-minutes: 2
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
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 }}" --extra async pytest -rs --no-cov