-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (39 loc) · 1010 Bytes
/
reusable-test.yaml
File metadata and controls
46 lines (39 loc) · 1010 Bytes
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
name: Reusable Test Workflow
on:
workflow_call:
inputs:
test_command:
required: true
type: string
description: 'Command to run tests'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.10", "3.11", "3.12", "3.13", ]
include:
- os: windows-latest
python-version: "3.10"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Hugging Face
id: cache-hf
uses: actions/cache@v4
with:
path: ~/.cache/huggingface
key: ${{ runner.os }}-hf
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.10.0"
- name: Install dependencies for Python ${{ matrix.python-version }}
run: |
uv python pin ${{ matrix.python-version }}
uv sync --group test
- name: Run tests
run: |
uv run ${{ inputs.test_command }}