-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (64 loc) · 1.94 KB
/
ci.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CI
on: push
jobs:
test:
runs-on: ubuntu-latest
env:
DJANGO_SETTINGS_MODULE: rca.settings.test
SECRET_KEY: testingsecretkey
SECURE_SSL_REDIRECT: false
ALLOWED_HOSTS: localhost
DATABASE_URL: postgres://postgres:postgres@localhost/postgres
BIRDBATH_REQUIRED: false
services:
postgres:
image: postgres:12.3
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install npm dependencies
run: npm install
- name: CSS linting
run: npm run lint:css
- name: JS linting
run: npm run lint:js
- name: Prettier
run: npm run format
- name: JS tests
run: npm run test
- name: Compile static files
run: npm run build:prod
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: Gr1N/setup-poetry@v8
with:
poetry-version: 1.5.0
- name: Install Poetry
run: |
poetry config virtualenvs.create false &&
poetry install
# - name: Flake8
# run: flake8 ./rca fabfile.py
- name: isort
run: isort --check-only --diff ./rca fabfile.py
- name: black
run: black --check --diff ./rca fabfile.py --exclude migrations/
- name: collectstatic
run: python manage.py collectstatic --verbosity 0 --noinput --clear
- name: System checks
run: python manage.py check
- name: Missing migrations
run: python manage.py makemigrations --check --noinput
- name: Test
run: python manage.py test --settings=rca.settings.test