Skip to content

Commit

Permalink
ci: build on both JDK 17 and 21
Browse files Browse the repository at this point in the history
  • Loading branch information
loicrouchon committed Dec 31, 2023
1 parent db61663 commit e9db8e8
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'

- id: version
name: Ensure version number is consistent with branch type
run: make version-check

test:
name: Test
strategy:
matrix:
java-version: [ 17, 21, 22 ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -29,13 +32,13 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
java-version: ${{ matrix.java-version }}

- name: Build application
run: ./mvnw --batch-mode verify

- name: Re-run integration tests in opaque testing mode
run: ./mvnw --batch-mode verify -DopaqueTesting=true # TODO migrate this to a maven fail-safe execution
run: ./mvnw --batch-mode verify -DopaqueTesting=true

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
Expand All @@ -52,11 +55,13 @@ jobs:
target/surefire-reports/
- name: Test standalone symly version
run: target/distributions/symly-*-standalone/bin/symly --version
run: |
target/distributions/symly-*-standalone/bin/symly --version
target/distributions/symly-*-standalone/bin/symly --help
release:
name: Release
# if: startsWith(github.ref, 'refs/heads/release/')
if: startsWith(github.ref, 'refs/heads/release/')
needs: [ env, test ]

runs-on: ubuntu-latest
Expand Down Expand Up @@ -89,7 +94,7 @@ jobs:
env:
JRELEASER_PROJECT_VERSION: ${{ steps.read-version.outputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# JRELEASER_HOMEBREW_GITHUB_TOKEN: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
JRELEASER_HOMEBREW_GITHUB_TOKEN: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
- name: JReleaser release output
if: always()
uses: actions/upload-artifact@v3
Expand All @@ -100,13 +105,13 @@ jobs:
out/jreleaser/trace.log
out/jreleaser/release/CHANGELOG.md
# - id: publish
# env:
# REPO_FEDORA_COPR_SYMLY_USERNAME: loicrouchon
# REPO_FEDORA_COPR_SYMLY_PASSWORD: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
# REPO_SYMLY_DEBIAN_USERNAME: loicrouchon
# REPO_SYMLY_DEBIAN_PASSWORD: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
# run: |
# git config --global user.email "[email protected]"
# git config --global user.name "GitHub CI publisher bot"
# make publish
- id: publish
env:
REPO_FEDORA_COPR_SYMLY_USERNAME: loicrouchon
REPO_FEDORA_COPR_SYMLY_PASSWORD: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
REPO_SYMLY_DEBIAN_USERNAME: loicrouchon
REPO_SYMLY_DEBIAN_PASSWORD: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub CI publisher bot"
make publish

0 comments on commit e9db8e8

Please sign in to comment.