-
-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (40 loc) · 1.32 KB
/
app_ci.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: sheetwork build, test, cov report
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Deploy PG docker
run: docker-compose -f ./tests/docker_postgres/docker-compose.yml up -d
- name: Check for Container
run: docker ps
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Poetry
uses: Gr1N/setup-poetry@v4
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with:
path: ~/.virtualenvs
key: poetry-$
restore-keys: |
poetry-$
- name: Install Dependencies using Poetry
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: Run Tests and Coverage Report
run: |
PYTHONPATH=src/ poetry run python -m pytest --cov-report=xml:coverage-reports/coverage.xml --cov-report term-missing --cov=sheetwork tests/
- name: Upload coverage report to CodeCov
uses: codecov/codecov-action@v1
with:
env_vars: GITHUB_RUN_ID
file: coverage-reports/coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false