Skip to content

Commit f10d900

Browse files
committed
update integration test
1 parent 90bb7d3 commit f10d900

File tree

2 files changed

+38
-7
lines changed

2 files changed

+38
-7
lines changed

.github/workflows/integration.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,39 @@ jobs:
4646
with:
4747
python-version: '3.11'
4848

49-
- name: Run integration test suite
49+
- name: Set up Node.js
50+
uses: actions/setup-node@v4
51+
with:
52+
node-version: '20'
53+
cache: npm
54+
cache-dependency-path: frontend/interactEM/package-lock.json
55+
56+
- name: Install frontend dependencies
57+
working-directory: frontend/interactEM
58+
run: npm ci
59+
60+
- name: Install Playwright browsers (with system deps)
61+
working-directory: frontend/interactEM
62+
run: npx playwright install --with-deps
63+
64+
- name: Setup env and run docker compose
65+
run: make setup && make docker-up
66+
67+
- name: Run integration tests
5068
run: make integration-test
5169

70+
- name: Upload Playwright report
71+
if: always()
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: playwright-report
75+
path: frontend/interactEM/playwright-report
76+
if-no-files-found: ignore
77+
78+
- name: Stop containers
79+
if: always()
80+
run: make docker-down
81+
5282
- name: Show docker compose logs on failure
5383
if: failure()
5484
run: docker compose logs --no-color

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ SCRIPTS_DIR := ./scripts
33
DOCKER_DIR := ./docker
44
FRONTEND_DIR := ./frontend/interactEM
55
OPERATORS_DIR := ./operators
6+
ROOT_DIR := $(shell pwd)
67

78
# Makefile configuration
89
.PHONY: help setup setup-docker-registry services docker-up docker-down clean lint operators check-docker-permission integration-test
@@ -144,15 +145,15 @@ test: ## Run tests
144145
$(call success,Tests complete)
145146

146147
integration-test: ## Run integration tests against the docker-compose stack using the configured marker
147-
$(call section,Starting services for integration tests...)
148-
$(MAKE) setup
149-
$(MAKE) docker-up
150148
$(call section,Running integration tests...)
151149
@status=0; \
152-
trap '$(MAKE) docker-down' EXIT; \
150+
set -a; if [ -f .env ]; then . ./.env; fi; set +a; \
153151
uv run pytest tests -m "$(INTEGRATION_MARKER)" || status=$$?; \
154152
if [ $$status -eq 5 ]; then \
155-
echo "No tests collected for marker '$(INTEGRATION_MARKER)'; skipping."; \
156-
status=0; \
153+
echo "No tests collected for marker '$(INTEGRATION_MARKER)'; skipping."; \
154+
status=0; \
155+
fi; \
156+
if [ $$status -eq 0 ]; then \
157+
cd $(FRONTEND_DIR) && npm run test:e2e || status=$$?; \
157158
fi; \
158159
exit $$status

0 commit comments

Comments
 (0)