Skip to content

Commit 8f4cb09

Browse files
committed
Use run preview
1 parent cef97fe commit 8f4cb09

1 file changed

Lines changed: 71 additions & 31 deletions

File tree

.github/workflows/ci.yml

Lines changed: 71 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI Pipeline
1+
name: CI
22

33
on:
44
push:
@@ -102,58 +102,98 @@ jobs:
102102
name: Cypress - Dashboard
103103
runs-on: ubuntu-latest
104104
needs: docker-build
105+
105106
steps:
106-
- uses: actions/checkout@v4
107-
- uses: cypress-io/github-action@v6
108-
with:
109-
start: npm run build
110-
wait-on: 'http://localhost:5173'
111-
spec: cypress/e2e/dashboard/**/*.cy.ts
107+
- uses: actions/checkout@v4
108+
109+
- name: Build Docker image
110+
run: docker build -t web-ui:test .
111+
112+
- name: Start container
113+
run: docker run -d -p 3000:80 web-ui:test
114+
115+
- name: Wait for app
116+
run: npx wait-on http://localhost:3000
117+
118+
- name: Run Cypress
119+
run: npx cypress run --spec "cypress/e2e/dashboard/**/*.cy.ts"
112120

113121
cypress-events:
114122
name: Cypress - Events
115123
runs-on: ubuntu-latest
116124
needs: docker-build
125+
117126
steps:
118-
- uses: actions/checkout@v4
119-
- uses: cypress-io/github-action@v6
120-
with:
121-
start: npm run build
122-
wait-on: 'http://localhost:5173'
123-
spec: cypress/e2e/dashboard/**/*.cy.ts
127+
- uses: actions/checkout@v4
128+
129+
- name: Build Docker image
130+
run: docker build -t web-ui:test .
131+
132+
- name: Start container
133+
run: docker run -d -p 3000:80 web-ui:test
134+
135+
- name: Wait for app
136+
run: npx wait-on http://localhost:3000
137+
138+
- name: Run Cypress
139+
run: npx cypress run --spec "cypress/e2e/dashboard/**/*.cy.ts"
124140

125141
cypress-insights:
126142
name: Cypress - Insights
127143
runs-on: ubuntu-latest
128144
needs: docker-build
145+
129146
steps:
130-
- uses: actions/checkout@v4
131-
- uses: cypress-io/github-action@v6
132-
with:
133-
start: npm run build
134-
wait-on: 'http://localhost:5173'
135-
spec: cypress/e2e/dashboard/**/*.cy.ts
147+
- uses: actions/checkout@v4
148+
149+
- name: Build Docker image
150+
run: docker build -t web-ui:test .
151+
152+
- name: Start container
153+
run: docker run -d -p 3000:80 web-ui:test
154+
155+
- name: Wait for app
156+
run: npx wait-on http://localhost:3000
157+
158+
- name: Run Cypress
159+
run: npx cypress run --spec "cypress/e2e/dashboard/**/*.cy.ts"
136160

137161
cypress-organizations:
138162
name: Cypress - Organizations
139163
runs-on: ubuntu-latest
140164
needs: docker-build
165+
141166
steps:
142-
- uses: actions/checkout@v4
143-
- uses: cypress-io/github-action@v6
144-
with:
145-
start: npm run build
146-
wait-on: 'http://localhost:5173'
147-
spec: cypress/e2e/dashboard/**/*.cy.ts
167+
- uses: actions/checkout@v4
168+
169+
- name: Build Docker image
170+
run: docker build -t web-ui:test .
171+
172+
- name: Start container
173+
run: docker run -d -p 3000:80 web-ui:test
174+
175+
- name: Wait for app
176+
run: npx wait-on http://localhost:3000
177+
178+
- name: Run Cypress
179+
run: npx cypress run --spec "cypress/e2e/dashboard/**/*.cy.ts"
148180

149181
cypress-user:
150182
name: Cypress - User
151183
runs-on: ubuntu-latest
152184
needs: docker-build
185+
153186
steps:
154-
- uses: actions/checkout@v4
155-
- uses: cypress-io/github-action@v6
156-
with:
157-
start: npm run build
158-
wait-on: 'http://localhost:5173'
159-
spec: cypress/e2e/dashboard/**/*.cy.ts
187+
- uses: actions/checkout@v4
188+
189+
- name: Build Docker image
190+
run: docker build -t web-ui:test .
191+
192+
- name: Start container
193+
run: docker run -d -p 3000:80 web-ui:test
194+
195+
- name: Wait for app
196+
run: npx wait-on http://localhost:3000
197+
198+
- name: Run Cypress
199+
run: npx cypress run --spec "cypress/e2e/dashboard/**/*.cy.ts"

0 commit comments

Comments
 (0)