-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (53 loc) · 1.63 KB
/
checks.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
name: Checks
on:
push:
branches:
- master
jobs:
checks:
name: Run Django checks
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: semkov
POSTGRES_PASSWORD: semkov
POSTGRES_DB: semkov
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Check for missing migrations
run: |
python manage.py makemigrations --dry-run --check --verbosity=3 --settings=semkov.settings.test
- name: Run Django system checks
run: |
python manage.py check --fail-level WARNING --settings=semkov.settings.test
- name: Run pre-commit hook
uses: pre-commit/action@v3.0.0
- name: Run Pytest suite
run: |
pytest --create-db --disable-warnings --ds=semkov.settings.test semkov/
- name: Build docker image
run: |
docker build -t mantiby/semkov:latest .