Skip to content

Commit 88db19e

Browse files
committed
Integrate e2e tests.
1 parent cbaf4e9 commit 88db19e

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

.github/workflows/docker-ci.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66

77
env:
88
REGISTRY: docker.io
9-
IMAGE_BACKEND: mansi3133/task-backend
10-
IMAGE_FRONTEND: mansi3133/task-frontend
9+
IMAGE_BACKEND: ${{ secrets.DOCKERHUB_USERNAME }}/task-backend
10+
IMAGE_FRONTEND: ${{ secrets.DOCKERHUB_USERNAME }}/task-frontend
1111

1212
jobs:
1313
build-and-push:
@@ -41,3 +41,21 @@ jobs:
4141
context: ./frontend
4242
push: true
4343
tags: ${{ env.IMAGE_FRONTEND }}:latest
44+
45+
e2e-tests:
46+
runs-on: ubuntu-latest
47+
needs: build-and-push
48+
steps:
49+
- name: Pull and run containers
50+
run: |
51+
docker run -d -p 4000:4000 --name backend ${{ secrets.DOCKERHUB_USERNAME }}/task-backend:latest
52+
docker run -d -p 5173:80 --name frontend ${{ secrets.DOCKERHUB_USERNAME }}/task-frontend:latest
53+
54+
- name: Wait for services
55+
run: |
56+
npx wait-on http://localhost:4000/tasks
57+
npx wait-on http://localhost:5173
58+
59+
- name: Run E2E Tests
60+
working-directory: e2e
61+
run: npx playwright test

0 commit comments

Comments
 (0)