Skip to content

fixing tests

fixing tests #41

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Code quality
on:
workflow_dispatch:
push:
branches: [dev_alban, dev_thomas, master, pre_deploy_1.1]
pull_request:
branches: [dev_alban, dev_thomas, master, pre_deploy_1.1]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
#----------------------------------------------
# ----- install & configure conda
#----------------------------------------------
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.9
conda-build-version: "*"
channels: conda-forge,defaults
channel-priority: true
- shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- shell: bash -l {0}
run: |
conda env update -n test --file environment.yml
- name: Create mongoDB Docker container
run: sudo docker run -d -p 27017:27017 mongo:latest
#----------------------------------------------
# Code quality check
#----------------------------------------------
- name: Lint with flake8
shell: bash -l {0}
run: |
conda info
conda activate test
# stop the build if there are Python syntax errors or undefined names
flake8 . --exclude=.venv,.git,.ipynb_checkpoints,notebooks --count --select=E9,F63,F7,F82,E262,F841,E265,E266,E712,E713,F401,F403,F405,F811 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --exclude=.venv,.git,.ipynb_checkpoints,notebooks --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics