Skip to content

Commit

Permalink
Unify CI under one workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
culka committed May 29, 2024
1 parent f61c916 commit b4a06ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Push image to docker hub and run e2e tests
name: Run Java tests, push image to docker hub and run e2e tests

on:
push:
Expand All @@ -8,7 +8,12 @@ on:
workflow_dispatch:

jobs:
run_java_tests:
name: Run Java tests
uses: ./.github/workflows/java-tests.yml

push_to_registry:
needs: run_java_tests
name: Build & Push docker image to dockerhub
runs-on: ubuntu-22.04

Expand Down Expand Up @@ -58,7 +63,9 @@ jobs:
docker push $IMAGE_NAME:latest
run_e2e_tests:
needs: push_to_registry
needs:
- run_java_tests
- push_to_registry
name: Run E2E tests
runs-on: ubuntu-22.04
steps:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/java-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Run java tests

on:
push:
pull_request:
branches: [main]
# this workflow is only called by others, won't be executed on itself
workflow_call:

jobs:
run-tests:
Expand Down

0 comments on commit b4a06ae

Please sign in to comment.