Files
rendercv/.github/workflows/test.yaml
dependabot[bot] 808ab9e746 build(deps): bump actions/upload-artifact from 5 to 6 (#623)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 18:38:58 +03:00

107 lines
2.9 KiB
YAML

name: Test
# GitHub events that trigger the workflow:
on:
push:
branches:
- main
pull_request:
branches:
- "*"
workflow_call: # to make the workflow triggerable from other workflows
workflow_dispatch: # to make the workflow triggerable manually
# The workflow:
jobs:
prek:
name: Run pre-commit checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.13"
- name: Install just
uses: taiki-e/install-action@just
- name: Install the project
run: just sync
- name: Run prek
uses: j178/prek-action@v1
with:
extra-args: --all-files
test:
name: Test with Py${{ matrix.python-version }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]
python-version: ["3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install just
uses: taiki-e/install-action@just
- name: Test
run: just test-coverage
- name: Rename the coverage file
run: mv .coverage .coverage.${{ matrix.python-version }}.${{ matrix.os }}
- name: Upload coverage as an artifact
uses: actions/upload-artifact@v6
with:
include-hidden-files: true
name: coverage-${{ matrix.python-version }}-${{ matrix.os }}
path: .coverage.${{ matrix.python-version }}.${{ matrix.os }}
report-coverage:
name: Generate the coverage report
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Download coverage files
uses: actions/download-artifact@v7
with:
pattern: coverage-* # download all the uploaded coverage reports
path: coverage
merge-multiple: true # download them in the same folder
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install just
uses: taiki-e/install-action@just
- name: Combine coverage files
run: |
uv run --frozen coverage combine coverage
uv run --frozen coverage report
uv run --frozen coverage html --show-contexts --title "RenderCV coverage for ${{ github.sha }}"
- name: Upload the coverage report to smokeshow
run: uv tool run smokeshow==0.4.0 upload ./htmlcov
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: ${{ github.event_name != 'pull_request' && 'Coverage {coverage-percentage}' || '' }}
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 90
SMOKESHOW_GITHUB_CONTEXT: coverage
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}