gpg release fix (#20) #40
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
| # CI workflow for ans-sdk-java | |
| # Runs build, tests, and checkstyle on pushes/PRs to main. | |
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| checks: write | |
| jobs: | |
| # Build all modules, run tests, and checkstyle validation. | |
| # Enforces a minimum 90% coverage threshold. | |
| build-and-test: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Validate Gradle wrapper | |
| uses: gradle/actions/wrapper-validation@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2 | |
| - name: Cache Gradle packages | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Check coverage threshold | |
| run: ./gradlew jacocoTestCoverageVerification | |
| - name: Publish unit test report | |
| uses: mikepenz/action-junit-report@49b2ca06f62aa7ef83ae6769a2179271e160d8e4 # v6.3.1 | |
| if: always() | |
| with: | |
| report_paths: '**/build/test-results/test/TEST-*.xml' | |
| check_name: 'Unit Test Report' | |
| - name: Upload coverage reports | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: coverage-reports | |
| path: '**/build/reports/jacoco/test/jacocoTestReport.xml' | |
| retention-days: 30 |