Close connections during CRaC snapshotting #3
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: Agroal CI | |
on: | |
push: | |
branches: '**' | |
pull_request: | |
schedule: | |
- cron: '0 5 * * 0' # at 05:00 on Sunday | |
jobs: | |
build: | |
name: Java 17 - Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
cache: 'maven' | |
distribution: 'temurin' | |
java-package: jdk | |
java-version: '17' | |
- run: mvn -B install | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: agroal-repository-artifact | |
path: ~/.m2/repository/io/agroal/** | |
retention-days: 1 | |
test: | |
needs: build | |
strategy: | |
matrix: | |
java: [ 21, 17, 11 ] | |
os: [ ubuntu-latest, windows-latest ] | |
name: Java ${{ matrix.java }} ${{ matrix.os }} - Test | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
cache: 'maven' | |
distribution: 'temurin' | |
java-package: jdk | |
java-version: ${{ matrix.java }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: agroal-repository-artifact | |
path: ~/.m2/repository/io/agroal | |
# don't run spring tests on JVMs older than 17 | |
- run: rm -r agroal-test/src/test/java/io/agroal/test/springframework && mvn --projects agroal-test verify -D"version.org.springframework.boot=2.6.1" | |
deploy: | |
if: ${{ github.repository == 'agroal/agroal' && github.ref == 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
needs: [ build, test ] | |
name: Java 17 - Rebuild and Deploy Snapshot Artifacts | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
cache: 'maven' | |
distribution: 'temurin' | |
java-package: jdk | |
java-version: '17' | |
server-id: jboss-snapshots-repository | |
server-username: MAVEN_CI_USERNAME | |
server-password: MAVEN_CI_PASSWORD | |
- id: project | |
run: echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> "$GITHUB_ENV" | |
- if: endsWith(${{ env.PROJECT_VERSION }}, '-SNAPSHOT') | |
run: mvn -B deploy -P jboss-release | |
env: | |
MAVEN_CI_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_CI_PASSWORD: ${{ secrets.MAVEN_TOKEN }} |