network_inventory/.github/workflows/tests.yml

29 lines
873 B
YAML

on:
push:
branches: [ "master", "dev" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master", "dev" ]
env:
IMAGE_NAME: network_inventory
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
- name: Enable Nix shell
run: |
nix develop
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --statistics
- name: Test with pytest
run: |
pytest --ds=network_inventory.settings.ram_test -nauto --nomigrations --cov=.