From 899e73517d8d8155082979c89de21d18ca6f38b1 Mon Sep 17 00:00:00 2001 From: Dorian Lesbre Date: Tue, 23 Jan 2024 22:10:30 +0100 Subject: [PATCH] Python 3.8 on CI --- .github/workflows/python-app.yml | 24 +++++++++++++++++++++++- makefile | 8 +++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 8e37c83..9cc988b 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -14,7 +14,7 @@ permissions: contents: read jobs: - test: + test-3-11: runs-on: ubuntu-latest steps: @@ -35,3 +35,25 @@ jobs: run: btac --version - name: Test with pytest run: make test + + test-3-8: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.8 + uses: actions/setup-python@v3 + with: + python-version: "3.8" + - name: Install dependencies + run: make setup-dev + - name: Lint with flake8 + run: make flake8 + - name: Run formatters + run: make format-check + - name: Typecheck with mypy + run: make mypy + - name: Check script + run: btac --version + - name: Test with pytest + run: make quick-test diff --git a/makefile b/makefile index d744cba..7cb9f0d 100644 --- a/makefile +++ b/makefile @@ -16,6 +16,7 @@ DOCKER_IMG_NAME = btac PRECOMMIT = pre-commit MYPY = mypy PYTEST = pytest +QUICK_TEST = $(PYTEST) -k "not test_9_API" # set to ON/OFF to toggle ANSI escape sequences COLOR = ON @@ -73,9 +74,14 @@ precommit-all: ## run precommit on all files $(call print,Running precommit on all files) $(PRECOMMIT) run --all-files +.PHONY: test +quick-test: ## Run local tests (perform no API queries) + $(call print,Running pytest (skip API query test)) + $(QUICK_TEST) + .PHONY: test test: ## Run all tests - $(call print,Running pytest) + $(call print,Running pytest on all test) $(PYTEST) --cov .PHONY: coverage