Skip to content

Commit 3fe64b9

Browse files
committed
update frontend action
1 parent 70ef586 commit 3fe64b9

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/reusable__e2e-testing.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ jobs:
8888
-e SPRING_PROFILES_ACTIVE=integration-test \
8989
${{inputs.DOCKER_IMAGE_TAG }} &
9090
91+
- name: Set up JDK ${{ vars.JAVA_VERSION }}
92+
uses: actions/setup-java@v4
93+
with:
94+
java-version: ${{ vars.JAVA_VERSION }}
95+
distribution: 'temurin'
96+
97+
- name: Install backend dependencies
98+
if: inputs.COMMIT_HASH != ''
99+
run: cd ./backend && mvn package
100+
91101
- name: Run application from local code
92102
if: inputs.COMMIT_HASH != ''
93103
run: cd ./backend && mvn spring-boot:run -Dspring-boot.run.profiles=integration-test &
@@ -106,6 +116,8 @@ jobs:
106116
107117
- name: Cypress run e2e tests
108118
uses: cypress-io/github-action@v6
119+
env:
120+
PORT: ${{ inputs.COMMIT_HASH != '' && '4200' || '8080'}}
109121
with:
110122
build: npm i -D cypress
111123
working-directory: frontend
@@ -114,7 +126,7 @@ jobs:
114126
wait-on-timeout: 120
115127
browser: chrome
116128
headed: false
117-
config: baseUrl=http://pitc.okr.localhost:8080
129+
config: baseUrl=http://pitc.okr.localhost:${{env.PORT}}
118130
spec: cypress/e2e/${{ matrix.file }}
119131

120132
- uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)