-
-
Notifications
You must be signed in to change notification settings - Fork 237
52 lines (51 loc) · 1.61 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
name: test
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Set up python
id: setup-python
uses: actions/setup-python@v2
with:
python-version: 3.7
- uses: actions/checkout@v2
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
sudo apt-get install libblas3 liblapack3 liblapack-dev libblas-dev gfortran libatlas-base-dev
poetry config --local virtualenvs.in-project true
poetry install --no-interaction
- name: check quality
run: |
source .venv/bin/activate
prospector
pre-commit run -a
- name: test app
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
echo Test
source .venv/bin/activate
coverage run -m unittest || exit 11
coverage combine
coverage report
if [ -n "$CODACY_PROJECT_TOKEN" ]; then
coverage xml -o cobertura.xml
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r cobertura.xml
else
echo no CODACY_PROJECT_TOKEN
fi