Skip to content

Commit d1449fa

Browse files
committed
add workflow
1 parent be13e47 commit d1449fa

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/pytest.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Pytest
2+
3+
on:
4+
push:
5+
branches: ["*"]
6+
pull_request:
7+
branches: ["*"]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.11"]
15+
name: Test with pytest (Python ${{ matrix.python-version }})
16+
steps:
17+
- name: Checkout project
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v4
24+
with:
25+
version: "latest"
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
32+
- name: Install project with dev dependencies
33+
run: |
34+
uv pip install -e ".[dev]"
35+
36+
- name: Install Pantograph
37+
run: |
38+
uv pip install git+https://github.com/stanford-centaur/PyPantograph
39+
40+
- name: Install torch
41+
run: |
42+
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
43+
44+
- name: Set up GitHub access token
45+
if: ${{ secrets.GITHUB_ACCESS_TOKEN }}
46+
env:
47+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}
48+
run: |
49+
echo "GITHUB_ACCESS_TOKEN is set"
50+
51+
- name: Run pytest
52+
env:
53+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}
54+
run: |
55+
uv run pytest lean_dojo_v2/tests -v
56+

0 commit comments

Comments
 (0)