Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit ceb35cc

Browse files
committed
ci 4
1 parent d3dc757 commit ceb35cc

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.github/workflows/python-package.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ jobs:
4141
run: |
4242
python -m pip install --upgrade pip
4343
python -m pip install flake8 pytest
44-
pip install .
44+
# Install as editable so that tests run in cwd, instead of in wherever Python puts system lib. This is important because tests are run on the local (not system lib) files. Therefore, the npm run build produces its files locally, not in system libs; if installed in system libs, then the components won't be able to find these files.
45+
pip install -e .
4546
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
4647
- name: Test with pytest
4748
id: pytest
4849
run: |
49-
pwd
50-
pytest -s -v -k test_dynamic
50+
pytest -s -v -k test_dynamic
5151
5252
- uses: act10ns/slack@v1
5353
with:

runestone/conftest.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,15 @@
3232
# Run this once, before all tests, to update the webpacked JS.
3333
@pytest.fixture(scope="session", autouse=True)
3434
def run_webpack():
35-
p = subprocess.run(["pwd"], text=True, shell=True, capture_output=True)
36-
print(p.stderr + p.stdout)
37-
assert not p.returncode
38-
39-
35+
import os
36+
print(os.getcwd())
4037

4138
# Note that Windows requires ``shell=True``, since the command to execute is ``npm.cmd``. Use the ``--`` to pass following args to the script (webpack), per the `npm docs <https://docs.npmjs.com/cli/v7/commands/npm-run-script>`_. Use ``--env test`` to tell webpack to do a test build of the Runestone Components (see `RAND_FUNC <RAND_FUNC>`).
4239
p = subprocess.run(["npm", "run", "build", "--", "--env", "test"], text=True, shell=IS_WINDOWS, capture_output=True)
4340
print(p.stderr + p.stdout)
4441
assert not p.returncode
4542

43+
print(os.getcwd())
4644
p = subprocess.run(["ls", "-la", "runestone/dist"], text=True, shell=IS_WINDOWS, capture_output=True)
4745
print(p.stderr + p.stdout)
4846
assert not p.returncode

0 commit comments

Comments
 (0)