-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (43 loc) · 1.62 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
44
45
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 uv
uv pip install --system flake8
uv pip install --system git+https://github.com/mupif/mupif.git@master
uv pip install --system -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 .