Skip to content

Commit a7ebca9

Browse files
authored
Merge pull request #25 from DRMacIver/DRMacIver/ci
Add CI workflow
2 parents 6684eef + be8c8fc commit a7ebca9

File tree

5 files changed

+35
-2
lines changed

5 files changed

+35
-2
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.11", "3.12"]
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v3
17+
with:
18+
version: "latest"
19+
- name: Set up Python ${{ matrix.python-version }}
20+
run: uv python install ${{ matrix.python-version }}
21+
- name: Install system dependencies
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y minisat
25+
- name: Install Python dependencies
26+
run: uv sync --extra dev
27+
- name: Run tests
28+
run: uv run python -m pytest tests/

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
package = "shrinkray"
15-
python_versions = ["3.11"]
15+
python_versions = ["3.12"]
1616
nox.needs_version = ">= 2021.6.6"
1717
nox.options.sessions = (
1818
"lint",

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ dev = [
3636
"hypothesis>=6.92.1",
3737
"hypothesmith>=0.3.1",
3838
"black",
39+
"pytest",
40+
"pytest-trio",
41+
"coverage[toml]",
42+
"pygments",
3943
]
4044

4145
[tool.setuptools.packages.find]

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[pytest]
22
trio_mode = true
3+
addopts = -v

tests/test_clang_delta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
@pytest.mark.parametrize("transformation", TRANSFORMATIONS)
20-
@pytest.mark.parametrize("source", [BAD_HELLO, CRASHER])
20+
@pytest.mark.parametrize("source", [BAD_HELLO, CRASHER], ids=["BAD_HELLO", "CRASHER"])
2121
async def test_can_apply_transformations(transformation, source):
2222
cd_exec = find_clang_delta()
2323
assert os.path.exists(cd_exec)

0 commit comments

Comments
 (0)