Skip to content

Merge pull request #1162 from sigstore/renovate/com.gradle.plugin-pub… #4078

Merge pull request #1162 from sigstore/renovate/com.gradle.plugin-pub…

Merge pull request #1162 from sigstore/renovate/com.gradle.plugin-pub… #4078

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and
# cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Test
on:
push:
branches: [main]
pull_request: {}
workflow_call: {} # allow this workflow to be called by other workflows
jobs:
build:
strategy:
matrix:
# sigstore-java still supports Java 11, however, we test it with conformance-tests only
java-version: [17, 21]
fail-fast: false
concurrency:
# On main/release, we don't want any jobs cancelled
# On PR branches, we cancel the job if new commits are pushed
# More info: https://stackoverflow.com/a/70972844/1261287
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}-${{ matrix.java-version }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
# We need Java 21 for the build, so we install it always
java-version: |
${{ matrix.java-version }}
21
distribution: 'temurin'
- name: Setup Go environment
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: '1.25.x'
# at some point this should just be replaced with something that can bring up a sigstore test env
- name: Install Fulcio
run: go install github.com/sigstore/fulcio@main
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
# if you need to skip staging due to flakiness use "-PskipStaging"
- name: Test sigstore-java
run: ./gradlew build -Porg.gradle.java.installations.auto-download=false -PjdkTestVersion=${{ matrix.java-version }}
- name: Ensure sigstore-java self signing still works
if: ${{ !github.event.pull_request.head.repo.fork }}
run: ./gradlew -Porg.gradle.java.installations.auto-download=false sigstore-java:publishToMavenLocal -Prelease -PskipPgpSigning
- name: Test sigstore-java/sandbox
run: |
cd sandbox
./gradlew -Porg.gradle.java.installations.auto-download=false build