-
Notifications
You must be signed in to change notification settings - Fork 42
80 lines (79 loc) · 2.41 KB
/
test.yml
File metadata and controls
80 lines (79 loc) · 2.41 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
---
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
# We need to specify 20.04 to maintain compatibility with older Python versions :-(
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5432/tcp
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mysql:
image: mysql:latest
env:
MYSQL_USER: mysql
MYSQL_PASSWORD: password
MYSQL_RANDOM_ROOT_PASSWORD: true
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
env:
TEST_MYSQL_HOST: mysql
TEST_MYSQL_USER: mysql
TEST_MYSQL_PASSWORD: password
TEST_POSTGRES_HOST: postgres
TEST_POSTGRES_USER: postgres
TEST_POSTGRES_PASSWORD: password
continue-on-error: ${{ contains(matrix.python-version, 'pypy') || contains(matrix.python-version, 'dev') }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "pypy3.6"
- "pypy3.7"
- "pypy3.8"
- "pypy3.9"
- "pypy3.10"
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libcurl4-openssl-dev
version: 1.0
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
env:
# Workaround from https://github.com/actions/setup-python/issues/866
PIP_TRUSTED_HOST: ${{ contains(matrix.python-version, '3.5') && 'pypi.python.org pypi.org files.pythonhosted.org' || 'none'}}
cache: "pip"
- run: >
pip install wheel
&& pip install -r dev-requirements.txt
&& pip install .
env:
# Workaround from https://github.com/actions/setup-python/issues/866
PIP_TRUSTED_HOST: ${{ contains(matrix.python-version, '3.5') && 'pypi.python.org pypi.org files.pythonhosted.org' || 'none'}}
- run: coverage run -m unittest openid.test.test_suite
- run: coverage report