Repository navigation
Bump the minor-and-patch group with 4 updates #136
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: CI Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # 17 is the supported floor, 21 and 25 the LTS releases above it. 25 matters | |
| # specifically: dnsjava's multi-release service registration broke every hostname | |
| # lookup on JVMs >= 18, and nothing below that line would have caught it. | |
| java-version: [17, 21, 25] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@v6.0.1 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: 'temurin' | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Run tests | |
| run: mvn clean test | |
| - name: Generate test report | |
| uses: dorny/test-reporter@v3 | |
| if: success() || failure() | |
| with: | |
| name: Maven Tests (Java ${{ matrix.java-version }}) | |
| path: target/surefire-reports/*.xml | |
| reporter: java-junit | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: test-results-java-${{ matrix.java-version }} | |
| path: target/surefire-reports/ | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v6.0.1 | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| # verify, not package: it adds the shaded-jar smoke test and the JaCoCo report, | |
| # which is what the release gate runs. Building with `package` here meant the | |
| # first time a release ever checked the packaged jar was actually runnable was | |
| # after the tag had been pushed. | |
| # -Dgpg.skip: maven-gpg-plugin binds `sign` to the verify phase for the Maven Central | |
| # deploy, and there is no signing key here. Only the `central` release job needs it. | |
| - name: Build project | |
| run: mvn clean verify -Dgpg.skip=true | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tunnel-jar | |
| path: target/TestingBotTunnel-*.jar | |
| # The self-contained distributions are otherwise only built by release.yml, on a | |
| # tag -- after Maven Central has already published. The Windows leg had never | |
| # passed there: dist/archive.sh called `zip`, which Git Bash on the runners lacks, | |
| # and nothing before the 5.0 tag could have said so. Linux and Windows cover the | |
| # two launchers and both archive formats; macOS adds signing, which needs secrets | |
| # a pull request does not get. | |
| runtime: | |
| needs: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v6.0.1 | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Build JAR | |
| shell: bash | |
| run: mvn -B -DskipTests package | |
| - name: Build self-contained runtime | |
| shell: bash | |
| run: dist/build-runtime.sh | |
| - name: Verify runtime | |
| shell: bash | |
| run: dist/verify-runtime.sh "$(ls -d dist/testingbot-tunnel-*/ | head -1)" |