Skip to content

Commit 13e2093

Browse files
committed
ci: add tests
1 parent e8d9f9b commit 13e2093

4 files changed

Lines changed: 57 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Pythox CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: 1. Check out code
14+
uses: actions/checkout@v4
15+
16+
- name: 2. Set up UV
17+
uses: astral-sh/setup-uv@v6
18+
19+
- name: 3. Install dependencies
20+
run: |
21+
uv venv
22+
uv pip install -e .
23+
24+
- name: 4. Run tests
25+
run: |
26+
# 'uv run' will find the .venv created by 'uv pip'
27+
uv run pytest -vv

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- An implementation of the [Lox](https://craftinginterpreters.com/the-lox-language.html) language using Python.
33

44
Run:
5+
56
```
67
python main.py
78
```

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ requires-python = ">=3.12"
77
dependencies = [
88
"prompt-toolkit>=3.0.51",
99
"pytest>=8.4.1",
10+
"pytest-json-report>=1.5.0",
1011
"rich>=14.0.0",
1112
]
1213

uv.lock

Lines changed: 28 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)