Skip to content

install mupif in workflow definition (and use uv there for the speedup) #291

install mupif in workflow definition (and use uv there for the speedup)

install mupif in workflow definition (and use uv there for the speedup) #291

Workflow file for this run

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 .