From a7e32ad7dd2dc48429c415a2be46c2385c275a72 Mon Sep 17 00:00:00 2001 From: Vlad Emelianov Date: Tue, 2 Jan 2024 00:42:30 +0300 Subject: [PATCH] Run tests on all versions --- .github/workflows/on_push.yml | 9 +++++++++ .github/workflows/on_push_coverage.yml | 7 +++++-- poetry.lock | 17 +---------------- pyproject.toml | 1 - 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml index 70037ec4..629fa1fd 100644 --- a/.github/workflows/on_push.yml +++ b/.github/workflows/on_push.yml @@ -12,8 +12,15 @@ jobs: max-parallel: 4 matrix: python-version: + - "3.7" + - "3.8" + - "3.9" - "3.10" - "3.11" + - "3.12" + include: + - version: "3.11" + check-formatting: "true" steps: - uses: actions/checkout@v3 - name: Set up Python for Poetry @@ -37,10 +44,12 @@ jobs: - name: Install dependencies run: | poetry install -n + poetry run pip install flake8 pytest - name: Install Node.js dependencies run: | npm install -g pyright - name: Code style + if: ${{ matrix.check-formatting }} run: | poetry run black --check handsdown --preview poetry run isort -c handsdown diff --git a/.github/workflows/on_push_coverage.yml b/.github/workflows/on_push_coverage.yml index 997a3773..d47ed358 100644 --- a/.github/workflows/on_push_coverage.yml +++ b/.github/workflows/on_push_coverage.yml @@ -35,5 +35,8 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | - poetry run pytest --cov-report term --cov handsdown - poetry run codecov + poetry run pytest --cov-report xml --cov handsdown + - name: Send coverage report + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/poetry.lock b/poetry.lock index 96ad465c..946d3c36 100644 --- a/poetry.lock +++ b/poetry.lock @@ -256,21 +256,6 @@ files = [ colorama = {version = "*", markers = "platform_system == \"Windows\""} importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} -[[package]] -name = "codecov" -version = "2.1.13" -description = "Hosted coverage reports for GitHub, Bitbucket and Gitlab" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "codecov-2.1.13-py2.py3-none-any.whl", hash = "sha256:c2ca5e51bba9ebb43644c43d0690148a55086f7f5e6fd36170858fa4206744d5"}, - {file = "codecov-2.1.13.tar.gz", hash = "sha256:2362b685633caeaf45b9951a9b76ce359cd3581dd515b430c6c3f5dfb4d92a8c"}, -] - -[package.dependencies] -coverage = "*" -requests = ">=2.7.9" - [[package]] name = "colorama" version = "0.4.6" @@ -1644,4 +1629,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "055c0724d727cbff4087f89dd1b30194cddbc58f496cd7a0b3e1219c7abd1254" +content-hash = "94ec47c4e644bbfaa81d715daf494fa483c583ad28ab7bf5ac6a145ab183cf78" diff --git a/pyproject.toml b/pyproject.toml index 21e163c2..027f7378 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,7 +83,6 @@ twine = { version = "*", python = ">=3.10" } pytest = { version = "*", python = ">=3.10" } pytest-cov = { version = "*", python = ">=3.10" } vulture = { version = "*", python = ">=3.10" } -codecov = { version = "*", python = ">=3.10" } rope = "*" types-setuptools = "*" mkdocs = "*"