diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index d8c94999..00000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: "CI" -on: - push: - branches: - - master - pull_request: -jobs: - tests: - runs-on: ubuntu-latest - strategy: - matrix: - java: [17, 21] - steps: - - uses: actions/checkout@v4 - - run: cd $GITHUB_WORKSPACE - - - uses: actions/setup-java@v4 - with: - java-version: ${{ matrix.java }} - java-package: jdk - architecture: x64 - distribution: temurin - - run: ./gradlew check - - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: testreport-audit-test-${{ matrix.java }} - path: examples/audit-test/build/reports/tests - - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: testreport-audit-test-allow-update-outside-transaction-${{ matrix.java }} - path: examples/audit-test-allow-update-outside-transaction/build/reports/tests - - - run: ./gradlew :examples:audit-test:check -Daudit-test.AuditTrail.datasource=DEFAULT - - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: testreport-audit-test-single-datasource-${{ matrix.java }} - path: examples/audit-test/build/reports/tests \ No newline at end of file diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index ba72e2f8..b57ab224 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,4 +1,4 @@ -name: Java CI +name: "Java CI" on: push: branches: @@ -13,6 +13,9 @@ env: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + java: ['17', '21'] steps: - name: "📥 Checkout the repository" uses: actions/checkout@v4 @@ -20,15 +23,31 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'liberica' - java-version: '17' + java-version: ${{ matrix.java }} - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 - - name: "🔨 Run Build" + - name: "🔨 Run Base Tests" env: DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} run: ./gradlew check + - name: "☄️ Upload Base Tests Results" + uses: actions/upload-artifact@v4 + with: + name: testreport-audit-test-allow-update-outside-transaction-${{ matrix.java }} + path: examples/audit-test-allow-update-outside-transaction/build/reports/tests + - name: "🔨 Run Tests Outside of Transaction" + env: + DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} + DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + run: ./gradlew :examples:audit-test:check -Daudit-test.AuditTrail.datasource=DEFAULT + - name: "☄️ Upload Outside of Transaction Tests Results" + uses: actions/upload-artifact@v4 + with: + name: testreport-audit-test-single-datasource-${{ matrix.java }} + path: examples/audit-test/build/reports/tests publish: if: github.event_name == 'push' needs: build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da676518..a99a10c7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release +name: "Release" on: release: types: [published]