Skip to content

Commit 8c1bbd4

Browse files
authoredMar 13, 2025··
Provide functionality to run the linter and tests for one service (#688)
Signed-off-by: Alexander Dahmen <[email protected]>
1 parent e66b384 commit 8c1bbd4

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed
 

‎.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ jobs:
2323
poetry config virtualenvs.create false
2424
make install-dev
2525
- name: Lint
26-
run: make lint
26+
run: make lint-services
2727
- name: Test
28-
run: make test
28+
run: make test-services

‎Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,28 @@ install-dev:
1212
# install core. This needs to be done last or it will get overriden by the dependency installation of the services
1313
poetry install -C core --no-root; pip install -e core
1414

15-
test:
15+
test-services:
1616
# test core
1717
cd core && poetry install --with dev && pytest
1818
# test services
1919
@for f in $(shell ls ${SERVICES_DIR}); do set -e; cd ${SERVICES_DIR}/$${f}; poetry install --with dev;sh -c 'pytest || ([ $$? = 5 ] && exit 0 || exit $$?)'; cd ../..; done
2020

21-
lint:
21+
lint-services:
2222
# lint core
2323
cd core && poetry install --no-root --only dev &&flake8 .
2424
# lint examples. Use configuration from core
2525
flake8 --toml-config core/pyproject.toml --black-config core/pyproject.toml examples;
2626
# lint services
2727
@for f in $(shell ls ${SERVICES_DIR}); do set -e; cd ${SERVICES_DIR}/$${f};poetry install --no-root --only dev; flake8 .; cd ../..; done
2828

29+
test:
30+
echo "Testing service ${service}"
31+
cd ${SERVICES_DIR}/${service}; poetry install --with dev;sh -c 'pytest || ([ $$? = 5 ] && exit 0 || exit $$?)'; cd ../..;
32+
33+
lint:
34+
echo "Linting service ${service}"
35+
cd ${SERVICES_DIR}/${service};poetry install --no-root --only dev; flake8 .; cd ../..;
36+
2937
update-dependencies:
3038
# lock core
3139
cd core && poetry lock

0 commit comments

Comments
 (0)
Please sign in to comment.