Skip to content

Bump the github-action-dependencies group across 1 directory with 3 updates #1756

Bump the github-action-dependencies group across 1 directory with 3 updates

Bump the github-action-dependencies group across 1 directory with 3 updates #1756

Workflow file for this run

name: build
permissions: read-all
env:
JAVA_VERSION: 21
JAVA_DISTRIBUTION: corretto
on:
push:
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
# We want to run on external PRs, but not on internal ones as push automatically builds
# H/T: https://github.com/Dart-Code/Dart-Code/commit/612732d5879730608baa9622bf7f5e5b7b51ae65
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'amazon-ion/ion-java'
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: recursive
- name: Setup Java
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v4.3.0
with:
distribution: ${{ env.JAVA_DISTRIBUTION}}
java-version: ${{ env.JAVA_VERSION}}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2
with:
validate-wrappers: true
- run: ./gradlew build
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: build/reports/jacoco/test/jacocoTestReport.xml
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: spotbugs-report
path: build/reports/spotbugs/
- name: ion-java-cli sanity check
run: ./ion-test-driver-run version
verify-jre-compatibility:
strategy:
fail-fast: false
matrix:
java: [8, 11, 17, 21]
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'amazon-ion/ion-java'
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: recursive
- name: Setup Java
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v4.3.0
with:
distribution: ${{ env.JAVA_DISTRIBUTION}}
java-version: ${{ env.JAVA_VERSION}}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2
with:
cache-read-only: true
validate-wrappers: true
- run: ./gradlew minifyTest${{matrix.java}}
check-version:
# Ensures that the version is not a release (i.e. -SNAPSHOT) or if it is a release version,
# ensures that the version is a later version number than the existing releases.
# See limitations at:
# https://github.com/amazon-ion/ion-java/blob/master/.github/actions/inspect-version/action.yml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v3.6.0
- name: Get Project Version
run: |
echo "PROJECT_VERSION=v$(<project.version)" >> $GITHUB_ENV
- uses: ./.github/actions/inspect-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo: amazon-ion/ion-java
project_version: ${{ env.PROJECT_VERSION }}
fail_if_invalid: true