Skip to content

Commit 3457b71

Browse files
alepeecursoragent
andcommitted
Add GitHub Actions workflow to run pytest on push (main/dev) and all PRs
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f3c3799 commit 3457b71

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/tests.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
tests:
13+
name: Run Pytest
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: ["3.12"]
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
cache: 'pip'
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33+
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
34+
35+
- name: Run tests
36+
run: |
37+
pytest

0 commit comments

Comments
 (0)