forked from pretalx/pretalx
-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (88 loc) · 2.59 KB
/
Copy pathtests.yml
File metadata and controls
94 lines (88 loc) · 2.59 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
# SPDX-FileCopyrightText: 2020-present Tobias Kunze
# SPDX-License-Identifier: Apache-2.0
name: Tests
on:
push:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'src/pretalx/locale/**'
- 'src/pretalx/frontend/**'
pull_request:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'src/pretalx/locale/**'
- 'src/pretalx/frontend/**'
workflow_dispatch:
permissions:
contents: write
checks: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
jobs:
test:
runs-on: ubuntu-latest
name: Tests
strategy:
fail-fast: false
matrix:
python-version: [3.13, 3.14]
database: [sqlite, postgres]
# We run tests on all Postgres x Python versions and on one version for sqlite.
exclude:
- database: sqlite
python-version: '3.13'
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pretalx
options: >-
--health-cmd "pg_isready -U postgres -d pretalx"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- uses: extractions/setup-just@v4
- name: Set up node
uses: actions/setup-node@v6
with:
node-version: 'latest'
- name: Install system dependencies
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo rm -f /etc/apt/sources.list.d/azure-cli.list
sudo apt clean
sudo apt update
sudo apt install -y gettext
- name: Install Python dependencies
run: just install --extra dev && uv pip install Faker
if: matrix.database != 'postgres'
- name: Install Python dependencies
run: just install --extra dev --extra postgres && uv pip install Faker
if: matrix.database == 'postgres'
- name: Install frontend dependencies
run: just install-npm
- name: Compile messages
run: just run compilemessages
- name: Run tests
run: just test-coverage -n auto -p no:sugar
env:
PRETALX_CONFIG_FILE: 'src/tests/ci_${{ matrix.database }}.cfg'