forked from dj-stripe/dj-stripe
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 1.55 KB
/
ci.yml
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
name: CI tests
on:
push:
paths-ignore:
- "docs/**"
- "pyproject.toml"
- "mkdocs.yml"
- ".readthedocs.yml"
- ".github/workflows/docs.yml"
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
env:
POETRY_VERSION: "1.2.2"
POETRY_VIRTUALENVS_IN_PROJECT: "1"
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
services:
postgres:
image: postgres:12
env:
POSTGRES_PASSWORD: djstripe
POSTGRES_DB: djstripe
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: djstripe
MYSQL_DATABASE: djstripe
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: ./.github/install_poetry_action
with:
POETRY_VERSION: ${{ env.POETRY_VERSION }}
python_version: ${{ matrix.python-version }}
- name: Install dependencies
run: poetry install --with ci
- name: Test with tox for ${{ matrix.python-version }}
run: poetry run tox
- name: Convert coverage
run: poetry run coverage xml