Skip to content

Bump the github-actions group with 5 updates #1166

Bump the github-actions group with 5 updates

Bump the github-actions group with 5 updates #1166

# For security reasons this is a separate GitHub workflow, see https://github.com/google/gson/issues/2429#issuecomment-1622522842
# Once https://github.com/mojohaus/animal-sniffer/issues/252 or https://github.com/mojohaus/animal-sniffer/pull/253
# are resolved, can consider adjusting pom.xml to include this as part of normal Maven build
name: Check Android compatibility
on:
push:
branches-ignore:
# Ignore Dependabot branches because it will also open a pull request, which would cause the
# workflow to redundantly run twice
- dependabot/**
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
check-android-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up JDK 11
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Check Android compatibility
run: |
# Run 'test' phase because plugin normally expects to be executed after tests have been compiled
# Have to skip 'test-jpms' module because it requires that full Gson JAR has been built
mvn --batch-mode --no-transfer-progress test animal-sniffer:check@check-android-compatibility -DskipTests --projects '!test-jpms'