-
Notifications
You must be signed in to change notification settings - Fork 25
52 lines (44 loc) · 1.33 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
# Builds and runs pytest on ubuntu-latest
# Tests python versions >=3.8
name: Run Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
# https://github.com/actions/setup-python
test-python3-ubuntu-latest:
name: test py${{ matrix.python-version }} on linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9']
env:
PYTHON: ${{ matrix.python-version }}
OS: ubuntu
steps:
- uses: actions/checkout@v2
- name: set up python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: |
pip install -r requirements.txt > /dev/null
SITE_PACKAGES=$( python -c 'import site; print(site.getsitepackages()[0])' )
cp ./resources/biolink-config.yaml ./conf/config.yaml
cp ./resources/ontobio-config.yaml ${SITE_PACKAGES}/ontobio/config.yaml
- name: run behave tests
run: |
export PYTHONPATH=.:$PYTHONPATH
export FLASK_USE_RELOADER=False
python biolink/app.py &
sleep 180
behave -f progress3 tests/
- name: run pytests
run: |
export PYTHONPATH=.:$PYTHONPATH
pytest tests/unit/