forked from paulscherrerinstitute/alphafold-on-fire
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (52 loc) · 1.53 KB
/
test-backend.yaml
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
53
54
55
56
57
58
---
name: Test Backend
on:
push:
branches: [main]
paths:
- "backend/**"
- "!backend/README.md"
- ".github/workflows/test-backend.yaml"
pull_request:
branches: [main]
paths:
- "backend/**"
- "!backend/README.md"
- ".github/workflows/test-backend.yaml"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
name: Test Code
runs-on: ubuntu-latest
container: python:3.9
defaults:
run:
# Step into backend
working-directory: ./backend
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi
- name: Run tests
env:
VERSION: test
RELEASEID: test
run: |
coverage run --concurrency=thread,greenlet --source=app -m pytest
coverage xml
# https://github.com/nedbat/coveragepy/issues/1082
# pytest-cov doesn't seem to support the `concurrency` flag so
# using coverage commands
- name: Codecov
# You may pin to the exact commit or the version.
# uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b
uses: codecov/codecov-action@v2
with:
# Flag upload to group coverage metrics (e.g. unittests, integration)
flags: backend # optional