Repository navigation
55 lines (44 loc) · 1.44 KB
/
Copy pathci.yml
File metadata and controls
55 lines (44 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# CI for the template repository itself — not shipped to generated
# projects (theirs is template/.github/workflows/ci.yml.jinja).
name: CI
on:
push:
branches: [main, pytorch]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
name: Lint and test the template (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# Linux, plus Windows, where the template is developed and
# where Copier's path handling differs most.
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v7
with:
# The tests render `--vcs-ref HEAD`, which Copier describes
# from the tags; a shallow clone has none.
fetch-depth: 0
- name: Set up uv
uses: astral-sh/[email protected]
with:
enable-cache: true
# The integration tests `git commit` inside generated projects.
- name: Configure a git identity
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Sync dependencies
run: uv sync --group dev --locked
- name: Ruff format check
run: uv run ruff format --check .
- name: Ruff lint
run: uv run ruff check .
- name: Tests
run: uv run pytest