Release 1.8.0 #425
This file contains 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 | |
on: [ push, pull_request, workflow_dispatch ] | |
env: | |
BASE_JAVA: 11 | |
jobs: | |
tests: | |
name: Test on ${{ matrix.os }} with Java ${{ matrix.java }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
java: [ 11, 21 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Redis | |
shell: bash | |
# It seems there's no straightforward way to install a recent redis version on Windows, so | |
# let's only consider macOS & Ubuntu for RedisStore tests. | |
run: | | |
if [[ "${{ matrix.os }}" == macos* ]] | |
then | |
brew install redis | |
elif [[ "${{ matrix.os }}" == ubuntu* ]] | |
then | |
chmod +x install-redis-ubuntu.sh | |
./install-redis-ubuntu.sh | |
fi | |
- name: Compile Java | |
uses: ./.github/actions/gradle | |
with: | |
java: 23 | |
gradle-args: compileJava -PenableErrorprone | |
- name: Run tests | |
uses: ./.github/actions/gradle | |
if: "!startsWith(matrix.os, 'macos')" | |
with: | |
java: ${{ matrix.java }} | |
gradle-args: check | |
# Brotli is not currently supported on macOS so related tests are excluded there. | |
- name: Run tests | |
uses: ./.github/actions/gradle | |
if: startsWith(matrix.os, 'macos') | |
with: | |
java: ${{ matrix.java }} | |
gradle-args: check -x :methanol-brotli:test | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: ${{ matrix.os }}-java-${{ matrix.java }}-test-results | |
path: | | |
**/build/test-results/ | |
**/build/**/*.exec | |
native-tests: | |
name: Test on GraalVM | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run tests | |
uses: ./.github/actions/gradle | |
with: | |
java: GraalVM | |
cmd: | | |
# For some reason, testing quarkus never works with one command either by just running | |
# `build` or running `quarkusBuild` & `test` on one run. | |
./gradlew :quarkus-native-test:quarkusBuild -PincludeNativeTests | |
./gradlew :quarkus-native-test:test -PincludeNativeTests | |
./gradlew :native-test:build -PincludeNativeTests | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: ubuntu-java-native-test-results | |
path: | | |
**/build/test-results/ | |
**/build/**/*.exec | |
coverage: | |
name: Upload coverage report | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download test results | |
uses: actions/download-artifact@v4 | |
with: | |
name: ubuntu-latest-java-${{ env.BASE_JAVA }}-test-results | |
- name: Generate coverage report | |
uses: ./.github/actions/gradle | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
with: | |
java: ${{ env.BASE_JAVA }} | |
gradle-args: coveralls | |
snapshot-release: | |
name: Release snapshot | |
if: | | |
github.event_name == 'push' | |
&& github.ref_name == github.event.repository.default_branch | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Publish snapshot release artifacts | |
uses: ./.github/actions/gradle | |
env: | |
ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.NEXUS_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | |
with: | |
java: ${{ env.BASE_JAVA }} | |
gradle-args: publishToSonatype |