Files
rendercv/.github/workflows/test.yaml
Sina Atalay 9b83f07ac9 Move distributable skill to rendercv/rendercv-skill submodule
The skill file lived in the main repo, which meant `npx skills add`
had to clone the entire RenderCV codebase and exposed internal dev
skills. A dedicated lightweight repo solves both problems.

- Create rendercv/rendercv-skill repo as a read-only distribution channel
- Add it as a submodule at .claude/skills/rendercv-skill/
- Update generation script and tests to write to the submodule path
- Add submodules: true to test workflow checkout steps
- Update docs, README, and install commands to use rendercv/rendercv-skill
- Add --recursive clone instruction to developer guide
- Delete the old skills/ directory at repo root
2026-03-20 20:41:53 +03:00

111 lines
3.0 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
with:
submodules: true
- 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
with:
submodules: true
- 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@v7
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@v8
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 }}