-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (42 loc) · 1.66 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
name: C/I testing with coverage
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Python dependencies
run: |
sudo apt-get update && sudo apt-get install --no-install-recommends --yes --quiet python3-pip python3-setuptools python3-wheel libpython3-dev python3-venv
- name: Install system dependencies
run: |
sudo apt-get update && sudo apt-get install --no-install-recommends --yes --quiet gcc-7 gcc gdal-bin imagemagick ffmpeg libmediainfo0v5 exiftool libjpeg-progs libexempi8
sudo gcc -o /usr/bin/dcraw -O4 external/dcraw.c -lm -DNODEPS
- name: Install dependencies for sqlite GIS
run: |
sudo apt-get update && sudo apt-get install libspatialite7 libsqlite3-mod-spatialite spatialite-bin
- name: Install Python packages
run: |
python3 -m pip install --upgrade pip
python3 -m venv venv
. venv/bin/activate
pip3 install wheel
pip3 install -r SpiMediaGallery/requirements.txt
- name: Installs Python packages and runs test
env:
FORCE_SQLITE3_DATABASE: 1
run: |
. venv/bin/activate
cp utils/spi_media_gallery_buckets.json "$HOME/.spi_media_gallery_buckets.json"
rm -rf SpiMediaGallery/main/migrations/*
source tools/environment-variables-for-test.sh
cd SpiMediaGallery
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