Skip to content

Commit 22ebc25

Browse files
committed
fix test workflow: direct .imp parsing, no monorepo bootstrap; maps path from env
1 parent 3a4e359 commit 22ebc25

2 files changed

Lines changed: 17 additions & 22 deletions

File tree

.github/workflows/test.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,28 @@ name: PyTest
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- "*/ci-check"
5+
branches: [main]
86
pull_request: {}
97

108
jobs:
119
test:
12-
name: PyTest
10+
name: PyTest (${{ matrix.os }}, ${{ matrix.python }})
1311
runs-on: ${{ matrix.os }}
1412
strategy:
1513
fail-fast: false
1614
matrix:
17-
os: [macos-latest, windows-latest, ubuntu-latest]
18-
python: [3.8, "3.10", 3.11, 3.12]
15+
os: [ubuntu-latest]
16+
python: ["3.10", "3.11", "3.12"]
1917
steps:
20-
- name: Checkout repository
21-
uses: actions/checkout@v4
18+
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v4
2220
with:
23-
repository: interscript/interscript
24-
- name: Run bootstrap script
25-
run: ruby bootstrap.rb
26-
- name: Use Ruby
27-
uses: ruby/setup-ruby@v1
28-
with:
29-
ruby-version: "3.2"
30-
- name: Use Python
31-
uses: actions/setup-python@v5
21+
repository: interscript/maps
22+
path: maps
23+
- uses: actions/setup-python@v5
3224
with:
3325
python-version: ${{ matrix.python }}
34-
- name: Compile maps
35-
run: cd python; pip install regex pytest; bash ./build.sh; pip install .
36-
- name: PyTest
37-
run: cd python; pytest
26+
- run: pip install -e ".[dev]"
27+
- run: pytest tests/ -v
28+
env:
29+
INTERSCRIPT_MAPS_PATH: ${{ github.workspace }}/maps/maps

tests/test_engine.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
}
2525
"""
2626

27-
MAPS = Path("/Users/mulgogi/src/interscript/interscript/maps/maps")
27+
MAPS = Path(__file__).parent.parent.parent / "maps" / "maps"
28+
import os
29+
if os.environ.get("INTERSCRIPT_MAPS_PATH"):
30+
MAPS = Path(os.environ["INTERSCRIPT_MAPS_PATH"])
2831

2932

3033
def _load(name: str) -> Engine:

0 commit comments

Comments
 (0)