From 16bc3c6990822d8378016e6633e3e333783391e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sat, 16 Jan 2021 16:02:35 +0100 Subject: [PATCH] Add a bunch of CI tests for the code --- .github/workflows/main.yaml | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..96a4052 --- /dev/null +++ b/.github/workflows/main.yaml @@ -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