1- # This does code inspection and checks to make sure building of docs works
2-
3- name : GitHub based tests
1+ name : PyTest
42
53on :
64 push :
119
1210jobs :
1311
14- build :
15- name : Code inspections
16- runs-on : ${{ matrix.os }}
17-
12+ linux :
13+ runs-on : ubuntu-latest
1814 strategy :
1915 matrix :
20- os : [ubuntu-latest]
21- python-version : ['3.12']
22- architecture : ['x64']
23-
16+ python-version : ['3.10', '3.11', '3.12', '3.13', '3.14']
17+
18+ name : Python ${{ matrix.python-version }}
2419 steps :
25- - uses : actions/checkout@v4
26- - name : setup
20+ - uses : actions/checkout@v5
21+
22+ # xvfb is used to run "headless" by providing a virtual X server
23+ # ffmpeg is used for handling mp3 files in some of our tests
24+ - name : Install xvfb and ffmpeg
25+ run : sudo apt-get install xvfb ffmpeg
26+
27+ - name : Setup Python
2728 uses : actions/setup-python@v5
2829 with :
2930 python-version : ${{ matrix.python-version }}
30- architecture : ${{ matrix.architecture }}
3131
32- - name : dependencies
33- run : |
34- python -m pip install -U pip wheel setuptools
35- - name : wheel
36- id : wheel
37- run : |
38- python -m pip install -e .[dev]
39- - name : " code-inspection: formatting"
40- if : ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
41- run : |
42- python ./make.py format --check
43- - name : " code-inspection: ruff-check"
44- if : ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
45- run : |
46- python ./make.py ruff-check
47- - name : " code-inspection: mypy"
48- if : ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
49- run : |
50- python ./make.py mypy
51- - name : " code-inspection: pyright"
52- if : ${{ (success() || failure()) && steps.wheel.outcome == 'success' }}
53- run : |
54- python ./make.py pyright
55- # Prepare the Pull Request Payload artifact. If this fails,
56- # we fail silently using the `continue-on-error` option. It's
57- # nice if this succeeds, but if it fails for any reason, it
58- # does not mean that our lint-test checks failed.
59- - name : Prepare Pull Request Payload artifact
60- id : prepare-artifact
61- if : always() && github.event_name == 'pull_request'
62- continue-on-error : true
63- run : cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json
64-
65- # This only makes sense if the previous step succeeded. To
66- # get the original outcome of the previous step before the
67- # `continue-on-error` conclusion is applied, we use the
68- # `.outcome` value. This step also fails silently.
69- - name : Upload a Build Artifact
70- if : always() && steps.prepare-artifact.outcome == 'success'
71- continue-on-error : true
72- uses : actions/upload-artifact@v4
32+ - name : Install UV
33+ uses : astral-sh/setup-uv@v7
7334 with :
74- name : pull-request-payload
75- path : pull_request_payload.json
76-
77- builddoc :
78-
79- name : Documentation build test
80- runs-on : ${{ matrix.os }}
35+ enable-cache : true
8136
82- strategy :
83- matrix :
84- os : [ubuntu-latest]
85- # python-version in must be kept in sync with .readthedocs.yaml
86- python-version : ['3.10'] # July 2024 | Match our contributor dev version; see pyproject.toml
87- architecture : ['x64']
37+ - name : Sync UV project
38+ run : uv sync
8839
89- steps :
90- - uses : actions/checkout@v4
91- - name : setup
92- uses : actions/setup-python@v5
93- with :
94- python-version : ${{ matrix.python-version }}
95- architecture : ${{ matrix.architecture }}
96-
97- - name : dependencies
98- run : |
99- python -m pip install -U pip wheel setuptools
100- - name : wheel
101- id : wheel
102- run : |
103- python -m pip install -e .[dev]
104- - name : build-docs
40+ - name : Run tests
41+ env :
42+ PYGLET_BACKEND : opengl
43+ REPL_ID : hello # Arcade checks for this to disable anti-aliasing
10544 run : |
106- sphinx-build doc build -W
107- # Prepare the Pull Request Payload artifact. If this fails,
108- # we fail silently using the `continue-on-error` option. It's
109- # nice if this succeeds, but if it fails for any reason, it
110- # does not mean that our lint-test checks failed.
111- - name : Prepare Pull Request Payload artifact
112- id : prepare-artifact
113- if : always() && github.event_name == 'pull_request'
114- continue-on-error : true
115- run : cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json
116-
117- # This only makes sense if the previous step succeeded. To
118- # get the original outcome of the previous step before the
119- # `continue-on-error` conclusion is applied, we use the
120- # `.outcome` value. This step also fails silently.
121- - name : Upload a Build Artifact
122- if : always() && steps.prepare-artifact.outcome == 'success'
123- continue-on-error : true
124- uses : actions/upload-artifact@v4
125- with :
126- name : pull-request-payload
127- path : pull_request_payload.json
45+ xvfb-run --auto-servernum uv run arcade
46+ xvfb-run --auto-servernum uv run pytest --maxfail=10
0 commit comments