Skip to content

Commit e1b3c4d

Browse files
committed
fix action for cpp build check
1 parent 7ad53de commit e1b3c4d

5 files changed

Lines changed: 24 additions & 17 deletions

File tree

.github/workflows/elasticapp.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,30 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
17-
python-version: ["3.10", "3.11"] #, "3.12"]
17+
python-version: ["3.11"] #, "3.12"]
1818
os: [ubuntu-latest] # , macos-latest]
1919

2020
steps:
21-
- uses: actions/checkout@v2
22-
21+
- uses: actions/checkout@v4
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v5
24+
with:
25+
uv-version: latest
2326
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v4.2.0
27+
uses: actions/setup-python@v5
2528
with:
2629
python-version: ${{ matrix.python-version }}
30+
- name: Install dependencies
31+
run: |
32+
make install-dev-deps PYTHON_VERSION=${{ matrix.python-version }}
33+
uv cache prune --ci
34+
source .venv/bin/activate
2735
28-
- name: Install PyElastica
29-
run: pip install . -v
30-
31-
- name: Install elasticapp backend
32-
run: pip install ./backend -v
33-
36+
- name: Install PyElastica + backend
37+
run: |
38+
uv pip install . -v
39+
uv pip install ./backend -v
3440
- name: Run elasticapp tests
3541
run: |
36-
python -m pip install pytest
37-
pytest backend/tests
42+
cd backend
43+
make test

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
run: python -c "import sys; print(sys.version)"
4545
# Set up cache
4646
- name: Set up cache
47-
uses: actions/cache@v4
47+
uses: actions/cache@v5
4848
with:
4949
path: ${{ matrix.path }}
5050
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('uv.lock') }}

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ mypy:
7171

7272
.PHONY: test
7373
test:
74-
uv run pytest -c pyproject.toml
74+
uv run pytest -c pyproject.toml tests
7575

7676
.PHONY: test_coverage
7777
test_coverage:
78-
NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica -c pyproject.toml
78+
NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica -c pyproject.toml tests
7979

8080
.PHONY: test_coverage_xml
8181
test_coverage_xml:
82-
NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica --cov-report=xml -c pyproject.toml
82+
NUMBA_DISABLE_JIT=1 uv run pytest --cov=elastica --cov-report=xml -c pyproject.toml tests
8383

8484
.PHONY: check-codestyle
8585
check-codestyle: black-check flake8 autoflake-check

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ warn_unused_ignores = false
139139

140140
exclude = [
141141
"elastica/experimental/*",
142+
"backend/*"
142143
]
143144

144145
[tool.coverage.report]

tests/test_restart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class BaseSimulatorClass(
168168

169169
return np.concatenate(recorded_list)
170170

171-
@pytest.mark.parametrize("final_time", [0.2, 1.0])
171+
@pytest.mark.parametrize("final_time", [0.002, 0.01])
172172
def test_save_restart_run_sim(self, tmp_path, final_time):
173173

174174
# First half of simulation

0 commit comments

Comments
 (0)