From 8ddaeb79a69befa0afd006ce6405ede46e598774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20Pie=C5=9Blak?= <zpieslak@gmail.com> Date: Wed, 25 Sep 2024 19:09:58 +0200 Subject: [PATCH] Add test workflow on opening pull request and merging to master Closes #1 --- .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c606d06 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v3 + with: + python-version: 3.11 + - name: Install dependencies + run: pip install -r requirements.txt -r requirements_test.txt + - name: Lint with flake8 + run: flake8 . --count --statistics + - name: Lint with mypy + run: mypy . + - name: Test + run: coverage run -m unittest -v + - name: Verify coverage + run: coverage report --fail-under=95