This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
62 lines (57 loc) · 1.65 KB
/
test.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
name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
env:
DJANGO_SETTINGS_MODULE: tbx.settings.test
DATABASE_URL: postgres://postgres:postgres@localhost/postgres # pragma: allowlist secret
CFG_SECRET_KEY: iamnotsosecret
CFG_ALLOWED_HOSTS: localhost
services:
postgres:
image: postgres:9.6
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres # pragma: allowlist secret
POSTGRES_DB: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: Gr1n/setup-poetry@v8
with:
poetry-version: 1.5.1
- name: Install python dependencies
run: |
poetry config virtualenvs.create false &&
poetry install
- name: Install npm dependencies
run: |
npm install npm-run-all
npm run build:prod
- name: Flake8
run: flake8 tbx fabfile.py
- name: isort
run: isort --check-only --diff tbx fabfile.py
- name: black
run: black --check tbx fabfile.py
- name: System checks
run: python manage.py check
- name: Missing migrations
run: python manage.py makemigrations --check
- name: Test
run: python manage.py test
- name: Lint CSS
run: npm run lint:css
- name: Lint JS
run: npm run lint:js
- name: Lint Format
run: npm run lint:format