Merge pull request #55 from znsio/order_bff_filters #294
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Java CI with Gradle | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| repository_dispatch: | |
| types: contracts changed | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| java: [17] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { fetch-depth: 0 } | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'oracle' | |
| java-version: ${{ matrix.java }} | |
| - name: Grant execute permission for gradlew on BFF repo | |
| run: chmod +x gradlew | |
| - name: Build BFF project with Gradle | |
| run: ./gradlew build | |
| - name: Run coverage report | |
| run: ./gradlew jacocoTestReport | |
| - name: Generate JaCoCo Badge | |
| id: jacoco | |
| uses: cicirello/jacoco-badge-generator@v2 | |
| with: | |
| generate-branches-badge: true | |
| jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv | |
| if: matrix.os == 'ubuntu-latest' | |
| - name: Log coverage percentage | |
| run: | | |
| echo "coverage = ${{ steps.jacoco.outputs.coverage }}" | |
| echo "branch coverage = ${{ steps.jacoco.outputs.branches }}" | |
| - name: Run Specmatic Insights Github Build Reporter | |
| uses: znsio/specmatic-insights-build-reporter-github-action@v2.0.2 | |
| with: | |
| github-token: ${{ secrets.ACTIONS_API_ACCESS_TOKEN }} | |
| org-id: ${{ secrets.SPECMATIC_ORG_ID }} | |
| branch-ref: ${{ github.ref }} | |
| branch-name: ${{ github.ref_name }} | |
| build-id: ${{ github.run_id }} | |
| repo-name: ${{ github.event.repository.name }} | |
| repo-id: ${{ github.repository_id }} | |
| repo-url: ${{ github.event.repository.html_url }} | |
| - name: Upload HTML Test Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.os }}-${{ matrix.java }}-html-report | |
| path: build/reports/specmatic/html |