network_inventory/.github/workflows/tests.yml

23 lines
620 B
YAML
Raw Normal View History

2022-11-12 22:46:46 +01:00
on:
push:
2022-11-19 15:35:44 +01:00
branches: [ "master", "dev" ]
2022-11-12 22:46:46 +01:00
pull_request:
# The branches below must be a subset of the branches above
2022-11-19 15:35:44 +01:00
branches: [ "master", "dev" ]
2022-11-19 15:33:52 +01:00
2022-11-12 22:46:46 +01:00
env:
IMAGE_NAME: network_inventory
jobs:
tests:
runs-on: ubuntu-latest
steps:
2022-11-21 23:09:07 +01:00
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
- name: Enable Nix shell
2022-11-12 22:46:46 +01:00
run: |
2022-11-21 23:09:07 +01:00
nix develop
2022-11-12 22:46:46 +01:00
# stop the build if there are Python syntax errors or undefined names
2022-11-21 23:09:07 +01:00
flake8 . --count --show-source --statistics
pytest --ds=network_inventory.settings.ram_test -nauto --nomigrations --cov=.