Debian Codegraph @

.github/workflows/test.yml

raw symbols SCIP
1 name: Test
2
3 on:
4 push:
5 branches: [main]
6 pull_request:
7 branches: [main]
8
9 env:
10 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 DEV_FAMILY_DOWNLOAD: ${{ secrets.DEV_FAMILY_DOWNLOAD }}
12 DEV_META_URL: ${{ secrets.DEV_META_URL }}
13 DEV_URL: ${{ secrets.DEV_URL }}
14 DEV_VERSIONS_URL: ${{ secrets.DEV_VERSIONS_URL }}
15 PRODUCTION_META_URL: ${{ secrets.PRODUCTION_META_URL }}
16 PRODUCTION_URL: ${{ secrets.PRODUCTION_URL}}
17 PRODUCTION_VERSIONS_URL: ${{ secrets.PRODUCTION_VERSIONS_URL }}
18 SANDBOX_FAMILY_DOWNLOAD: ${{ secrets.SANDBOX_FAMILY_DOWNLOAD }}
19 SANDBOX_META_URL: ${{ secrets.SANDBOX_META_URL }}
20 SANDBOX_URL: ${{ secrets.SANDBOX_URL }}
21 SANDBOX_VERSIONS_URL: ${{ secrets.SANDBOX_VERSIONS_URL }}
22 TRAFFIC_JAM_ID: ${{ secrets.TRAFFIC_JAM_ID }}
23 STATUS_FIELD_ID: ${{ secrets.STATUS_FIELD_ID }}
24 LIST_FIELD_ID: ${{ secrets.LIST_FIELD_ID }}
25 PR_GF_ID: ${{ secrets.PR_GF_ID }}
26 IN_DEV_ID: ${{ secrets.IN_DEV_ID }}
27 IN_SANDBOX_ID: ${{ secrets.IN_SANDBOX_ID }}
28 LIVE_ID: ${{ secrets.LIVE_ID }}
29 TO_SANDBOX_ID: ${{ secrets.TO_SANDBOX_ID }}
30 TO_PRODUCTION_ID: ${{ secrets.TO_PRODUCTION_ID }}
31 BLOCKED_ID: ${{ secrets.BLOCKED_ID }}
32
33 jobs:
34 build:
35 runs-on: ${{ matrix.platform }}
36 strategy:
37 fail-fast: false
38 matrix:
39 python-version: ["3.10", "3.12", "3.13", "3.14"]
40 platform: [ubuntu-latest, windows-latest]
41 steps:
42 - uses: actions/checkout@v4
43 with:
44 submodules: recursive
45 fetch-depth: 0
46 - name: Set up Python ${{ matrix.python-version }}
47 uses: actions/setup-python@v5
48 with:
49 python-version: ${{ matrix.python-version }}
50 - name: Install Cairo (Ubuntu)
51 if: matrix.platform == 'ubuntu-latest'
52 run: sudo apt-get update && sudo apt-get install libcairo2-dev
53 - name: Install ffmpeg (Ubuntu)
54 if: matrix.platform == 'ubuntu-latest'
55 run: sudo apt-get install ffmpeg
56 - name: Install ffmpeg (Windows)
57 if: matrix.platform == 'windows-latest'
58 run: choco install ffmpeg -y
59 shell: pwsh
60
61 # Temporarily skip QA extra on Python 3.14 until skia-python provides wheels for 3.14.
62 # The qa extra pulls in diffenator2 which depends on blackrenderer[skia] which in turn
63 # depends on skia-python. Building skia-python from source fails on CI.
64 # See: https://github.com/googlefonts/gftools/pull/1160
65 - name: Install packages (with QA)
66 if: matrix.python-version != '3.14'
67 run: |
68 pip install '.[qa,test]'
69 - name: Install packages (without QA)
70 if: matrix.python-version == '3.14'
71 run: |
72 pip install '.[test]'
73 - name: lint
74 run: |
75 black . --check --diff --color
76 - name: Run Server Tests
77 if: github.event.pull_request.head.repo.fork == false
78 run: |
79 pytest tests/push/*.py
80 shell: bash
81 - name: Run Tests
82 run: |
83 pytest tests/*.py
84 shell: bash