fix: add runtime hints for trace #180
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: NativeTests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths-ignore: | |
- 'spring-cloud-generator/**' | |
- 'spring-cloud-previews/**' | |
workflow_dispatch: | |
jobs: | |
NativeTests: | |
if: | | |
github.actor != 'dependabot[bot]' && (( | |
github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name | |
) || (github.event_name != 'pull_request')) | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Get current date | |
id: date | |
run: echo "date=$(date +'%Y-%m-%d' --utc)" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Set Up Authentication | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.SPRING_CLOUD_GCP_CI_NATIVE_SA_KEY }} | |
- name: Setup gcloud | |
uses: google-github-actions/setup-gcloud@v1 | |
with: | |
project_id: spring-cloud-gcp-ci-native | |
- name: Maven go offline | |
id: mvn-offline | |
if: steps.mvn-cache.outputs.cache-hit != 'true' | |
run: ./mvnw compile dependency:go-offline | |
- name: Mvn install # Need this when the directory/pom structure changes | |
id: install1 | |
continue-on-error: true | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
--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 \ | |
--threads 1.5C \ | |
--define maven.test.skip=true \ | |
--define maven.javadoc.skip=true \ | |
install | |
- name: Wait our turn for running native tests | |
uses: softprops/turnstyle@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
continue-after-seconds: 3600 # 60 min | |
same-branch-only: false | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: '22.3.2' | |
java-version: '17' | |
components: 'native-image' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
native-image-job-reports: 'true' | |
- name: Native Tests in Samples | |
id: intTest1 | |
continue-on-error: true | |
run: | | |
../mvnw \ | |
--batch-mode \ | |
--activate-profiles native-sample-config,nativeTest \ | |
--define notAllModules=true \ | |
--define maven.javadoc.skip=true \ | |
test | |
working-directory: ./spring-cloud-gcp-samples | |
- name: Retry on Failure | |
id: intTest2 | |
if: steps.intTest1.outcome == 'failure' | |
run: | | |
../mvnw \ | |
--batch-mode \ | |
--activate-profiles native-sample-config,nativeTest \ | |
--define notAllModules=true \ | |
--define maven.javadoc.skip=true \ | |
test | |
working-directory: ./spring-cloud-gcp-samples | |
- name: Aggregate Report | |
run: | | |
../mvnw \ | |
--batch-mode \ | |
--define aggregate=true \ | |
--activate-profiles native-sample-config \ | |
surefire-report:report-only | |
working-directory: ./spring-cloud-gcp-samples | |
- name: Native Tests in Modules | |
id: intTest3 | |
continue-on-error: true | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
--activate-profiles spring-native,\!default \ | |
--define maven.javadoc.skip=true \ | |
test | |
- name: Retry on Failure | |
id: intTest4 | |
if: steps.intTest3.outcome == 'failure' | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
--activate-profiles spring-native,\!default \ | |
--define maven.javadoc.skip=true \ | |
test | |
- name: Aggregate Report | |
run: | | |
./mvnw \ | |
--batch-mode \ | |
--define aggregate=true \ | |
--activate-profiles spring-native,\!default \ | |
surefire-report:report-only | |
- name: Archive logs | |
if: always() | |
continue-on-error: true | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Native Test Logs | |
path: | | |
**/target/failsafe-reports/* | |
**/target/site |