-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.39 KB
/
test.yaml
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
name: Run tests
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
postgres_version: ['14']
services:
postgres:
image: postgres:${{ matrix.postgres_version }}
env:
POSTGRES_DB: rp_sidekick
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
redis:
image: redis:6.0
ports:
- 6379:6379
env:
RP_SIDEKICK_DATABASE: postgres://postgres:postgres@localhost/rp_sidekick
steps:
- uses: actions/checkout@v2
- name: Install gettext
run: sudo apt-get install gettext
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ hashFiles('requirements.txt', 'requirements-dev.txt') }}-pip
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependancies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
- name: Lint
run: |
flake8
python manage.py makemigrations rp_dtone rp_transferto rp_recruit\
sidekick --dry-run | grep 'No changes detected' || (echo 'There are\
changes which require migrations.' && exit 1)
black --check .
isort -c -rc .
- name: Test
run: |
py.test