Skip to content

Commit 83fa1b6

Browse files
committed
Refactorize GitHub workflow
1 parent ef940b9 commit 83fa1b6

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

.github/workflows/actions.yaml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,18 @@ jobs:
1212
with:
1313
python-version: "3.12"
1414
- run: |
15-
make install
15+
make lint-deps
1616
make lint
1717
18-
tests:
19-
name: Run tests
18+
tests-examples:
19+
name: Run tests and examples
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@master
2323
- uses: actions/setup-python@master
2424
with:
2525
python-version: "3.12"
2626
- run: |
27-
make install
2827
make test-deps
2928
make tests
30-
31-
examples:
32-
name: Run examples
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/checkout@master
36-
- uses: actions/setup-python@master
37-
with:
38-
python-version: "3.12"
39-
- run: |
40-
make install
4129
make examples

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ _delete_pyc:
1515
_delete_pid:
1616
@find ${SIMULAQRON_DIR} -name '*.pid' -delete
1717

18+
lint-deps:
19+
@${PYTHON} -m pip install .\[lint\]
20+
1821
lint:
1922
@${PYTHON} -m flake8 ${SIMULAQRON_DIR} ${EXAMPLES_DIR} ${TEST_DIR}
2023

@@ -61,7 +64,7 @@ examples:
6164
@cd examples/native-mode/teleport && bash terminate.sh && sleep 3
6265
@echo "Chosen examples passed."
6366

64-
install: test-deps
67+
install:
6568
@$(PYTHON) -m pip install . ${PIP_FLAGS}
6669

6770
install-dev: install-optional

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ dev = [
5858
"pytest>=7.1, <8.0",
5959
"mypy",
6060
]
61+
# These 2 optional groups are a "bare-minimum" dependencies used for testing/linting in GitHub environments
62+
test = [
63+
"pytest>=7.1, <8.0",
64+
"projectq<=0.8.0",
65+
"qutip<5.0.0"
66+
]
67+
lint = [
68+
"flake8>=5.0.0,<6.0.0",
69+
]
6170

6271
[tool.setuptools.packages.find]
6372
include = ["simulaqron"]

0 commit comments

Comments
 (0)