Skip to content

Commit 722cc42

Browse files
committed
Combine test runs into a single workflow
1 parent 7dc92c8 commit 722cc42

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Push image to Docker hub and run e2e tests
1+
name: Run tests, push image to Docker hub and run e2e tests
22

33
on:
44
push:
@@ -8,9 +8,15 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11+
run_java_tests:
12+
name: Run Java tests
13+
uses: ./.github/workflows/run-java-tests.yml
14+
1115
push_to_registry:
1216
name: Build & Push docker image to Docker Hub
1317
runs-on: ubuntu-22.04
18+
needs:
19+
- run_java_tests
1420

1521
steps:
1622
- name: Checkout code
@@ -63,6 +69,8 @@ jobs:
6369
.
6470
6571
run_cypress_tests:
72+
name: Run Cypress tests
6673
needs:
74+
- run_java_tests
6775
- push_to_registry
6876
uses: ./.github/workflows/run-cypress-tests.yml

.github/workflows/run-java-tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Run java tests
22

33
on:
4-
push:
5-
pull_request:
6-
branches: [main]
4+
# this workflow is only called by others, won't be executed on itself
5+
workflow_call:
76

87
env:
98
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)