-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.56 KB
/
tests.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
name: Test Python Server (Backend)
on:
push:
branches: [development]
pull_request:
branches: [development]
workflow_dispatch:
jobs:
CI:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Setup Poetry
uses: abatilo/actions-poetry@v2.1.3
with:
poetry-version: 1.1.10
- name: Setup Project
run: |
cd server
poetry install
- name: Code Quality
run: |
cd server
poetry run black . --check
- name: Pytest Testing
env:
GV_TEST_USERNAME: ${{ secrets.GV_TEST_USERNAME }}
GV_TEST_PASSWORD: ${{ secrets.GV_TEST_PASSWORD }}
GV_TEST_STUDENTID: ${{ secrets.GV_TEST_STUDENTID }}
GV_TEST_STUDENT: ${{ secrets.GV_TEST_STUDENT }}
GV_DISTRICT_CODE: ${{ secrets.GV_DISTRICT_CODE }}
GV_SECRET: ${{ secrets.GV_SECRET }}
GV_FERNET: ${{ secrets.GV_FERNET }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
cd server
poetry run pytest --cov --cov-report=xml
- name: Upload Coverage
uses: codecov/codecov-action@v2
with:
files: ./server/coverage.xml