-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (52 loc) · 1.66 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
name: Test
on:
push:
branches: [ development, main, master, staging ]
pull_request:
branches: [ development, main, master, staging ]
jobs:
test:
runs-on: ubuntu-latest
environment:
name: development
strategy:
max-parallel: 4
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Format code in according to blake
working-directory: ./webAppClassifier
run: |
black webAppClassifier
black classifier
- name: Trim files
working-directory: ./webAppClassifier
run: trim .
- name: Check Code Quality
working-directory: ./webAppClassifier
run: flake8
- uses: codecov/codecov-action@v2
- name: Run Tests and Upload coverage testing
working-directory: ./webAppClassifier
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DEBUG: ${{ secrets.DEBUG }}
EMAIL_HOST: ${{ secrets.EMAIL_HOST }}
EMAIL_HOST_USER: ${{ secrets.EMAIL_HOST_USER }}
EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }}
run: |
python manage.py makemigrations
python manage.py migrate
python manage.py test
# coverage erase
# coverage xml
pip install codecov && codecov -t ${{ secrets.CODCOV_TOKEN }}