fix(dep): update all actions/upload-artifact to v4 as v2 was deprecated and now fails work flows #8430
Workflow file for this run
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
name: Unit Tests | |
on: | |
push: | |
branches: | |
- main | |
- 3.x | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '05 7 * * *' # 07:00 UTC every day | |
jobs: | |
unitTests: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [8, 11, 17] | |
steps: | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)" | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
- uses: actions/cache@v2 | |
id: mvn-cache | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.date }} | |
- name: Mvn install # Need this when the directory/pom structure changes | |
id: install1 | |
continue-on-error: true | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
--show-version \ | |
--threads 1.5C \ | |
--define maven.test.skip=true \ | |
--define maven.javadoc.skip=true \ | |
install | |
- name: Retry install on failure | |
id: install2 | |
if: steps.install1.outcome == 'failure' | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
--show-version \ | |
--threads 1.5C \ | |
--define maven.test.skip=true \ | |
--define maven.javadoc.skip=true \ | |
install | |
- name: Unit Tests | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
--fail-at-end \ | |
--threads 1.5C \ | |
test | |
- name: Aggregate Report | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
--define aggregate=true \ | |
surefire-report:report-only | |
- name: Archive logs | |
if: always() | |
continue-on-error: true | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Unit Test Logs - Java ${{ matrix.java }} | |
path: | | |
**/target/surefire-reports/* | |
**/target/site | |
releaseCheck: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d' --utc)" | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- uses: actions/cache@v2 | |
id: mvn-cache | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.date }} | |
- name: releaseCheck | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
-Drelease=true \ | |
-DskipTests \ | |
-Dgpg.skip \ | |
-Dcheckstyle.skip \ | |
clean \ | |
package | |
- name: docsCheck | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
--activate-profiles docs \ | |
-DskipTests \ | |
-Dgpg.skip \ | |
-Dcheckstyle.skip \ | |
--projects docs \ | |
clean \ | |
package | |
- name: Archive Artifacts | |
if: always() | |
continue-on-error: true | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Release Artifacts | |
path: | | |
**/.flattened-pom.xml | |
**/target/**.jar | |
target/site/apidocs | |
**/target/generated-docs | |
!spring-cloud-gcp-samples |