Skip to content

Commit

Permalink
Make deploy depend on Gradle test
Browse files Browse the repository at this point in the history
  • Loading branch information
MaisiKoleni committed Mar 10, 2022
1 parent e054523 commit bf5e873
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 44 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/gradle.yml

This file was deleted.

31 changes: 30 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,35 @@ jobs:
ares-maven-
- name: Test with Maven and JDK ${{ matrix.java }}
run: mvn -B clean test
test-gradle:
runs-on: ubuntu-latest
strategy:
matrix:
java: [17]
name: Java ${{ matrix.java }} Gradle Run
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Cache Maven Dependencies
uses: actions/[email protected]
with:
path: ~/.m2/repository
key: ares-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
ares-maven-
- name: Move Gradle build file
run: mv ./src/test/resources/build.gradle ./build.gradle
- name: Build and Install with Maven and JDK ${{ matrix.java }}
run: mvn -B clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dmaven.source.skip=true
- name: Test with Gradle and JDK ${{ matrix.java }}
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4
arguments: test
code-style:
runs-on: ubuntu-latest
name: Check Code Style
Expand Down Expand Up @@ -81,7 +110,7 @@ jobs:
run: mvn -B -P coverage clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=artemis-java-test-sandbox -Dsonar.organization=maisikoleni -Dsonar.host.url=https://sonarcloud.io
deploy:
if: startsWith(github.event.ref, 'refs/tags/')
needs: [code-style, test]
needs: [code-style, test, test-gradle]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit bf5e873

Please sign in to comment.