-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (48 loc) · 1.45 KB
/
ci-test-coverage.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: C/I testing with coverage
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
- name: Install minio
run: |
wget --no-verbose https://github.com/Swiss-Polar-Institute/tools-mirror/raw/main/minio/minio
chmod +x minio
source tools/environment-variables-for-test.sh
export MINIO_ACCESS_KEY="$OBJECT_STORAGE_ACCESS_KEY_ID"
export MINIO_SECRET_KEY="$OBJECT_STORAGE_SECRET_ACCESS_KEY"
mkdir -p minio_data/projects
./minio server minio_data &
- name: Install wkhtmltopdf
run: |
sudo apt-get update
sudo apt-get install wkhtmltopdf
- name: curlylint
run: |
tools/curlylint.sh
- name: Tests
run: |
source tools/environment-variables-for-test.sh
cd ProjectApplication
coverage erase
coverage run manage.py test
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
name: codecov-project
fail_ci_if_error: false