Limit number of execution attempts #168
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |