-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.43 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
name: CI
on: push
env:
PYTHON_VERSION: "3.10"
DJANGO_SETTINGS_MODULE: tests.settings
jobs:
linters:
name: "${{ matrix.linter }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
linter: ["isort", "black", "mypy", "flake8"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup project
uses: ./.github/actions/setup-project
- name: Add problem matcher
run: echo "::add-matcher::.github/${{ matrix.linter }}-problem-matcher.json"
- name: Run ${{ matrix.linter }}
run: poetry run make ${{ matrix.linter }}
pytest:
name: "pytest (django: ${{ matrix.django-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
django-version: ["3.2", "4.0", "4.1"]
services:
postgres:
image: bitnami/postgresql:15
ports:
- 5432:5432
env:
POSTGRESQL_DATABASE: test
POSTGRESQL_USERNAME: test
POSTGRESQL_PASSWORD: test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup project
uses: ./.github/actions/setup-project
- name: Install django
run: poetry run pip install "django==${{ matrix.django-version }}.*"
- name: Run pytest
run: poetry run pytest -v
env:
PGHOST: localhost
PGDATABASE: test
PGUSER: test
PGPASSWORD: test