diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..a2494d7 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,43 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Run Code Coverage + +on: + push: + tags: + - "*" + branches: + - "*" + + +permissions: + contents: read + +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install poetry + run: pipx install poetry + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: 'poetry' + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.11.x' + - name: Install dependencies + run: poetry install + - name: Run code coverage + run: | + poetry run python update-version.py + poetry run pytest tests --cov=tasi --cov-report=html:coverage -n auto + diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index b7f911e..a1d9684 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -12,8 +12,6 @@ on: push: tags: - "*" - branches: - - main permissions: contents: read