From bf5e873b4a36300da991803e8681f5f795dc07f2 Mon Sep 17 00:00:00 2001 From: Christian Femers Date: Thu, 10 Mar 2022 01:12:25 +0100 Subject: [PATCH] Make deploy depend on Gradle test --- .github/workflows/gradle.yml | 43 ------------------------------------ .github/workflows/maven.yml | 31 +++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/gradle.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml deleted file mode 100644 index 2c8b3aac..00000000 --- a/.github/workflows/gradle.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Java Gradle CI - -on: - pull_request: - push: - branches: - - 'master' - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - release: - types: - - created - -jobs: - 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/cache@v2.1.7 - 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 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index e55029fc..2a490e6b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -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/cache@v2.1.7 + 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 @@ -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