-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (41 loc) · 1.5 KB
/
tests.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
name: MuPIF DB
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
jobs:
test-linux:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# needs quotes so that float 3.10 does not get interpreted as 3.1
python-version: [ '3.10' ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add - && echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
sudo apt-get update && sudo apt-get -y install python3-wheel python3-pip mongodb-org
python -m pip install -q flake8
pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=obsolete
- name: Start MongoDB
run: |
mkdir ./mongo-data
/usr/bin/mongod --ipv6 --bind_ip_all --noauth --dbpath=./mongo-data --logpath=mongo.log &
sleep 5 # mongo is required for our REST API
cd mupifDB/api/edm; python dms3.py &
sleep 5
- name: pytest (native)
timeout-minutes: 2
run: |
python -m pytest .