Skip to content

Commit

Permalink
Test against multiple JVM versions
Browse files Browse the repository at this point in the history
This commit is a test commit for GitHub actions. Afterwards, these will
become comments and documentation.
  • Loading branch information
binkley committed Nov 12, 2023
1 parent 32240f7 commit e1174eb
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci-batect-gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ on:
workflow_dispatch:

jobs:
# Does your code need to check against several JVM versions?
build:
name: Builds and tests for Gradle
runs-on: ubuntu-latest
# First run in GitHub actions - verify this
# Afterwards, change to a comment
strategy:
matrix:
include:
- java: 17
- java: 21

steps:
- name: Clone repository
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci-batect-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
build:
name: Builds and tests for Maven
runs-on: ubuntu-latest
# First run in GitHub actions - verify this
# Afterwards, change to a comment
strategy:
matrix:
include:
- java: 17
- java: 21

steps:
- name: Clone repository
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci-earthly-gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
build:
name: Builds and tests
runs-on: ubuntu-latest
# First run in GitHub actions - verify this
# Afterwards, change to a comment
strategy:
matrix:
include:
- java: 17
- java: 21

steps:
- name: Use Earthly
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci-earthly-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
build:
name: Builds and tests
runs-on: ubuntu-latest
# First run in GitHub actions - verify this
# Afterwards, change to a comment
strategy:
matrix:
include:
- java: 17
- java: 21

steps:
- name: Use Earthly
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,10 @@ choice for the JDK.
mismatching or confusing build paths, project configuration, and Gradle
sorting it out. This is an issue for local-only builds; local builds using a
container (such as via [_Batect_](#setup-local-ci)) lower these concerns
* In GitHub Actions, building supports cross-checking multiple JVM versions,
use
[the `matrix` feature](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs).
See [the example GitHub actions](./.github/workflows/ci-batect-maven.yml)

### Managing your Java environment

Expand Down

0 comments on commit e1174eb

Please sign in to comment.