-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (29 loc) · 999 Bytes
/
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
---
name: Checks
on: [push, pull_request_review]
jobs:
test-lint:
name: Test and Lint
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Test
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
ALLOWED_HOSTS: ${{ secrets.ALLOWED_HOSTS }}
DEBUG: ${{ secrets.DEBUG }}
DB_NAME: ${{ secrets.DB_NAME }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASS: ${{ secrets.DB_PASS }}
run: docker-compose run app sh -c "python manage.py wait_for_db &&
coverage run manage.py test &&
coverage xml && mv .coverage ./app"
- uses: codecov/codecov-action@v3
with:
files: ./app/coverage.xml
verbose: true # optional (default = false)
- name: Pylint
run: docker-compose run --rm app sh -c "pylint *"
- name: Flake8
run: docker-compose run --rm app sh -c "flake8"