-
Notifications
You must be signed in to change notification settings - Fork 872
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup OSSF Scorecard workflow (#10224)
Signed-off-by: Matthieu MOREL <[email protected]>
- Loading branch information
Showing
24 changed files
with
220 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,23 +23,26 @@ on: | |
GE_CACHE_PASSWORD: | ||
required: false | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
spotless: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Free disk space | ||
run: .github/scripts/gha-free-disk-space.sh | ||
|
||
- name: Set up JDK for running Gradle | ||
uses: actions/setup-java@v4 | ||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 | ||
with: | ||
distribution: temurin | ||
java-version: 17.0.6 | ||
|
||
- name: Spotless | ||
uses: gradle/gradle-build-action@v2 | ||
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }} | ||
|
@@ -53,26 +56,26 @@ jobs: | |
gradle-wrapper-validation: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- uses: gradle/[email protected] | ||
- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # v1.1.0 | ||
|
||
license-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Free disk space | ||
run: .github/scripts/gha-free-disk-space.sh | ||
|
||
- name: Set up JDK for running Gradle | ||
uses: actions/setup-java@v4 | ||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 | ||
with: | ||
distribution: temurin | ||
java-version: 17.0.6 | ||
|
||
- name: Generate license report | ||
uses: gradle/gradle-build-action@v2 | ||
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }} | ||
|
@@ -107,7 +110,7 @@ jobs: | |
extra-dependency-management-enforcement: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Dependency check | ||
run: | | ||
|
@@ -130,13 +133,13 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Free disk space | ||
run: .github/scripts/gha-free-disk-space.sh | ||
|
||
- name: Set up JDK for running Gradle | ||
uses: actions/setup-java@v4 | ||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 | ||
with: | ||
distribution: temurin | ||
java-version: 17.0.6 | ||
|
@@ -146,7 +149,7 @@ jobs: | |
sed -i "s/org.gradle.jvmargs=/org.gradle.jvmargs=-Xmx3g /" gradle.properties | ||
- name: Build | ||
uses: gradle/gradle-build-action@v2 | ||
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | ||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }} | ||
|
@@ -173,7 +176,7 @@ jobs: | |
fi | ||
- name: Upload agent jar | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | ||
with: | ||
path: javaagent/build/libs/opentelemetry-javaagent-*-SNAPSHOT.jar | ||
|
||
|
@@ -201,34 +204,34 @@ jobs: | |
vm: openj9 | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Free disk space | ||
run: .github/scripts/gha-free-disk-space.sh | ||
|
||
- id: setup-test-java | ||
name: Set up JDK ${{ matrix.test-java-version }}-${{ matrix.vm }} for running tests | ||
uses: actions/setup-java@v4 | ||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 | ||
with: | ||
# using zulu because new releases get published quickly | ||
distribution: ${{ matrix.vm == 'hotspot' && 'zulu' || 'adopt-openj9'}} | ||
java-version: ${{ matrix.test-java-version }} | ||
|
||
- name: Set up JDK for running Gradle | ||
uses: actions/setup-java@v4 | ||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 | ||
with: | ||
distribution: temurin | ||
java-version: 17.0.6 | ||
|
||
# vaadin 14 tests fail with node 18 | ||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 | ||
with: | ||
node-version: 16 | ||
|
||
# vaadin tests use pnpm | ||
- name: Cache pnpm modules | ||
uses: actions/cache@v3 | ||
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-test-cache-pnpm-modules | ||
|
@@ -241,7 +244,7 @@ jobs: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }} | ||
GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }} | ||
uses: gradle/gradle-build-action@v2 | ||
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | ||
with: | ||
# "check" is needed to activate all tests for listing purposes | ||
# listTestsInPartition writes test tasks that apply to the given partition to a file named | ||
|
@@ -261,7 +264,7 @@ jobs: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }} | ||
GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }} | ||
uses: gradle/gradle-build-action@v2 | ||
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | ||
with: | ||
# spotless is checked separately since it's a common source of failure | ||
arguments: > | ||
|
@@ -278,15 +281,15 @@ jobs: | |
|
||
- name: Upload deadlock detector artifacts if any | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | ||
with: | ||
name: deadlock-detector-test-${{ matrix.test-java-version }}-${{ matrix.vm }}-${{ matrix.test-partition }} | ||
path: /tmp/deadlock-detector-* | ||
if-no-files-found: ignore | ||
|
||
- name: Upload jvm crash dump files if any | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | ||
with: | ||
name: javacore-test-${{ matrix.test-java-version }}-${{ matrix.test-partition }} | ||
path: | | ||
|
@@ -323,19 +326,19 @@ jobs: | |
run: git config --system core.longpaths true | ||
if: matrix.os == 'windows-latest' | ||
|
||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Free disk space | ||
run: .github/scripts/gha-free-disk-space.sh | ||
|
||
- name: Set up JDK for running Gradle | ||
uses: actions/setup-java@v4 | ||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 | ||
with: | ||
distribution: temurin | ||
java-version: 17.0.6 | ||
|
||
- name: Set up Gradle cache | ||
uses: gradle/gradle-build-action@v2 | ||
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | ||
with: | ||
# only push cache for one matrix option per OS since github action cache space is limited | ||
cache-read-only: ${{ inputs.cache-read-only || matrix.smoke-test-suite != 'tomcat' }} | ||
|
@@ -359,7 +362,7 @@ jobs: | |
|
||
- name: Upload jvm crash dump files if any | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | ||
with: | ||
name: javacore-smoke-test-${{ matrix.smoke-test-suite }}-${{ matrix.os }} | ||
# we expect crash dumps either in root director or in smoke-tests | ||
|
@@ -380,19 +383,19 @@ jobs: | |
gradle-plugins: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Free disk space | ||
run: .github/scripts/gha-free-disk-space.sh | ||
|
||
- name: Set up JDK for running Gradle | ||
uses: actions/setup-java@v4 | ||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 | ||
with: | ||
distribution: temurin | ||
java-version: 17.0.6 | ||
|
||
- name: Build | ||
uses: gradle/gradle-build-action@v2 | ||
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | ||
with: | ||
arguments: build ${{ inputs.no-build-cache && '--no-build-cache' || '' }} | ||
build-root-directory: gradle-plugins | ||
|
@@ -401,19 +404,19 @@ jobs: | |
examples: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Free disk space | ||
run: .github/scripts/gha-free-disk-space.sh | ||
|
||
- name: Set up JDK for running Gradle | ||
uses: actions/setup-java@v4 | ||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 | ||
with: | ||
distribution: temurin | ||
java-version: 17.0.6 | ||
|
||
- name: Set up Gradle cache | ||
uses: gradle/gradle-build-action@v2 | ||
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | ||
with: | ||
cache-read-only: ${{ inputs.cache-read-only }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.