-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (39 loc) · 1.13 KB
/
build_and_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
name: Build and Test
on: [push, pull_request, pull_request_target]
jobs:
build_and_test:
runs-on: ubuntu-latest
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DEBUG: "False"
ALLOWED_HOSTS: "*"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests with Code Coverage
run: |
coverage run manage.py test
coverage xml -o coverage.xml
if: success()
continue-on-error: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
if: success()
continue-on-error: true
- name: Analysing the code with pylint
run: |
pip install pylint
pylint $(git ls-files '*.py')
continue-on-error: true
if: success()