-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1017 Bytes
/
Copy path_run-tests-action.yml
File metadata and controls
38 lines (33 loc) · 1017 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
name: 'Python Tests Definition'
on:
workflow_call:
inputs:
python-version:
description: Python version to set up'
required: false
default: '3.10'
type: string
runner-os:
description: 'Runner OS'
required: false
default: 'ubuntu-latest'
type: string
jobs:
run-tests:
runs-on: ${{ inputs.runner-os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
- name: Install dependencies with uv
run: uv sync --extra cpu
- name: Make Sure PyTorch is Installed
run: uv pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cpu
- name: Test with pytest
run: uv run pytest tests