Add a bunch of CI tests for the code

This commit is contained in:
Jonas Schäfer
2021-01-16 16:02:35 +01:00
parent 9e3fcbaf67
commit 16bc3c6990

50
.github/workflows/main.yaml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Tests
on:
push:
branches:
- master
- "release/*"
pull_request:
branches:
- master
- "release/*"
workflow_dispatch:
jobs:
mypy:
runs-on: ubuntu-latest
name: 'typecheck: mypy'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install
run: |
set -euo pipefail
pip install mypy
pip install -r requirements.txt
- name: Typecheck
run: |
python -m mypy --config mypy.ini -p snikket_web
linting:
runs-on: ubuntu-latest
name: 'lint: flake8'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install
run: |
set -euo pipefail
pip install flake8
- name: Linting
run: |
python -m flake8 snikket_web