-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (47 loc) · 1.34 KB
/
run-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
name: Run tests
on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 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 XML dependencies
run: sudo apt-get install libxml2-dev libxmlsec1-dev
- name: Install required packages
run: |
python -m pip install --upgrade pip
pip install -r test_requirements.txt
pip list
- name: Create env file
run: |
cp .env.template .env
- name: Lint with flake8
run: flake8
- name: Check formatting
uses: psf/black@stable
- name: Check import sorting
uses: jamescurtin/isort-action@master
- name: Lint markdown files
uses: bewuethr/mdl-action@v1
- name: Run tests
run: |
docker compose run lti coverage run -m unittest discover
docker compose run lti coverage xml
- name: list files
run: |
ls -lah
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true