diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 175250c..bf4f6a0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,14 +1,13 @@ name: "Run docker build and deploy" on: - push: - tags: [ '*' ] + workflow_run: + workflows: [ 'Run Tests' ] + types: [ 'completed' ] jobs: - test: - uses: ./.github/workflows/test.yml - docker: + if: ${{ github.event.workflow_run.conclusion == 'success' && contains(github.event.ref, '/tags/') }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa00f69..e7ee0d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,10 +1,8 @@ -name: "Run Tests" +name: 'Run Tests' on: - workflow_call: push: branches: [ 'master' ] - tags-ignore: [ '*' ] pull_request: branches: [ '*' ] @@ -24,5 +22,17 @@ jobs: - name: Execute tests run: ./gradlew test + integrationTests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2.4.2 + - name: Execute integration tests run: ./gradlew integrationTest \ No newline at end of file