Merge pull request #1 from caplin/bugfix-service-posix-regex #39
Workflow file for this run
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: Build and Test | |
| on: | |
| push: | |
| branches: [ main, 'patch*' ] | |
| tags: [ '*' ] | |
| pull_request: | |
| branches: [ '*' ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build | |
| run: ./gradlew classes | |
| env: | |
| CAPLIN_USERNAME: ${{ secrets.CAPLIN_USERNAME }} | |
| CAPLIN_PASSWORD: ${{ secrets.CAPLIN_PASSWORD }} | |
| - name: Cache build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| */build | |
| key: ${{ github.ref_name }}-build-${{ github.sha }} | |
| test: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Restore build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| */build | |
| key: ${{ github.ref_name }}-build-${{ github.sha }} | |
| - name: Run tests | |
| run: ./gradlew --continue check koverXmlReport | |
| env: | |
| CAPLIN_USERNAME: ${{ secrets.CAPLIN_USERNAME }} | |
| CAPLIN_PASSWORD: ${{ secrets.CAPLIN_PASSWORD }} | |
| - name: Publish Test Report | |
| uses: mikepenz/action-junit-report@v5 | |
| if: always() | |
| with: | |
| report_paths: | | |
| reactive/api/build/test-results/test/TEST-*.xml | |
| reactive/core/build/test-results/test/TEST-*.xml | |
| reactive/java-flow/build/test-results/test/TEST-*.xml | |
| reactive/kotlin/build/test-results/test/TEST-*.xml | |
| reactive/reactivestreams/build/test-results/test/TEST-*.xml | |
| spring/build/test-results/test/TEST-*.xml | |
| util/build/test-results/test/TEST-*.xml | |
| - name: Upload coverage reports | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: build/reports/kover/report.xml | |
| fail_ci_if_error: false | |
| docs: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Restore build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| */build | |
| key: ${{ github.ref_name }}-build-${{ github.sha }} | |
| - name: Generate documentation | |
| run: ./gradlew dokkaGenerate | |
| env: | |
| CAPLIN_USERNAME: ${{ secrets.CAPLIN_USERNAME }} | |
| CAPLIN_PASSWORD: ${{ secrets.CAPLIN_PASSWORD }} | |
| - name: Upload documentation | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: documentation | |
| path: docs/build/dokka/html | |
| pages: | |
| needs: | |
| - test | |
| - docs | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Download documentation | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: documentation | |
| path: docs/build/dokka/html | |
| - name: Setup GitHub Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'docs/build/dokka/html' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| publish: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Publish libraries | |
| run: ./gradlew --no-configuration-cache publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CAPLIN_USERNAME: ${{ secrets.CAPLIN_USERNAME }} | |
| CAPLIN_PASSWORD: ${{ secrets.CAPLIN_PASSWORD }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyId: "BD2A1230" | |
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SONATYPE_GPG_KEY }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SONATYPE_GPG_PASSWORD }} | |
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} | |
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} |