Repository navigation
96 lines (81 loc) · 2.36 KB
/
Copy pathtest.yml
File metadata and controls
96 lines (81 loc) · 2.36 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
name: Test
on: [push, pull_request, workflow_dispatch]
permissions: {}
env:
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "pypy3.12"
- "pypy3.11"
- "3.16t"
- "3.16"
- "3.15t"
- "3.15"
- "3.14t"
- "3.14"
- "3.13"
- "3.12"
- "3.11"
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7.1.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Set PYTHON_GIL
if: endsWith(matrix.python-version, 't')
run: |
echo "PYTHON_GIL=0" >> "$GITHUB_ENV"
- name: Install uv
uses: astral-sh/setup-uv@v10.3.2
- name: Tox tests
run: |
uvx --python ${{ matrix.python-version }} --with tox-uv tox -e py
- name: Upload coverage
uses: codecov/codecov-action@v7.1.1
with:
flags: ${{ matrix.os }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
translations:
name: Translation catalogs up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Install gettext
run: |
sudo apt install gettext
- name: Update translations
run: |
scripts/update-translations.sh
- name: Check catalogs are up to date
run: |
if ! git diff --exit-code -I '^"POT-Creation-Date: ' -- src/humanize/locale; then
echo "::error::Translation catalogs are out of date." \
"Run scripts/update-translations.sh and commit the .po changes."
exit 1
fi
success:
if: always()
needs: [test, translations]
runs-on: ubuntu-latest
name: Test successful
steps:
- name: Success
env:
TEST_RESULT: ${{ needs.test.result }}
TRANSLATIONS_RESULT: ${{ needs.translations.result }}
run: |
test "$TEST_RESULT" = "success"
test "$TRANSLATIONS_RESULT" = "success"