diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 942013f..1b07609 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Tox and Trunk +name: Code check on: push: @@ -28,15 +28,21 @@ jobs: uses: actions/setup-python@master with: python-version: ${{ matrix.python-version }} + - name: Trunk Check + uses: trunk-io/trunk-action@main + - name: Tox run: | python -m pip install --upgrade pip python -m pip install -U tox tox - - name: Trunk Check - uses: trunk-io/trunk-action@main - - name: Upload coverage reports to Codecov + - if: ${{ github.event_name == 'push' && matrix.python-version == 3.12 }} + name: Export Coverage XML + run: tox -e coverage + + - if: ${{ github.event_name == 'push' && matrix.python-version == 3.12 }} + name: Upload coverage reports to Codecov uses: codecov/codecov-action@main with: diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 218b019..96ef94f 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -38,5 +38,5 @@ actions: enabled: - trunk-upgrade-available - trunk-announce - - trunk-check-pre-push - trunk-fmt-pre-commit + - trunk-check-pre-push diff --git a/README.md b/README.md index 80890e7..0799971 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Bug Tracker -[![Tox and Trunk](https://github.com/proafxin/bug-tracker/actions/workflows/python-package.yml/badge.svg?branch=develop)](https://github.com/proafxin/bug-tracker/actions/workflows/python-package.yml) - +[![Code check](https://github.com/proafxin/bug-tracker/actions/workflows/ci.yml/badge.svg)](https://github.com/proafxin/bug-tracker/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/proafxin/bug-tracker/graph/badge.svg?token=WAJ9M1BUL1)](https://codecov.io/gh/proafxin/bug-tracker) A set of asynchronous APIs to keep track of bugs under stories. diff --git a/codecov.yml b/codecov.yml index 76b4e3e..eccb09a 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,8 +1,7 @@ coverage: precision: 2 round: up - # trunk-ignore(yamllint/quoted-strings) - range: "85...100" + range: 85...100 status: patch: default: diff --git a/pyproject.toml b/pyproject.toml index 0807619..2ecef0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tracker" -version = "2.1.15" +version = "2.1.16" description = "A simple bug tracking API" authors = ["Masum Billal "] license = "LICENSE" diff --git a/tox.ini b/tox.ini index 2d96d73..2b0101b 100644 --- a/tox.ini +++ b/tox.ini @@ -28,7 +28,9 @@ commands = poetry install --with dev poetry run coverage run --source=. -m pytest poetry run coverage report -m --fail-under=85 - poetry run coverage xml -o coverage.xml + +[testenv:coverage] +commands = poetry run coverage xml -o coverage.xml ; [testenv:docs-win32]