Skip to content

Commit

Permalink
Run system tests on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Apr 19, 2024
1 parent 67fb115 commit 8e86c97
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/run-system-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Run System Tests
on:
push:
branches:
- gha-system-tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
run-system-tests:
name: '${{ matrix.os.name}} | Java ${{ matrix.java.version}}'
runs-on: ubuntu-latest
if: ${{ github.repository == 'spring-projects/spring-boot' }}
strategy:
matrix:
java:
- version: 17
toolchain: false
- version: 21
toolchain: true
steps:
- name: Check Out Code
uses: actions/checkout@v4
- name: Set Up Java
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: |
${{ matrix.java.version }}
${{ matris.java.toolchain && '17' || '' }}
- name: Set Up Gradle
uses: gradle/actions/setup-gradle@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11 #v3.3.0
with:
cache-read-only: false
- name: Configure Gradle Properties
shell: bash
run: |
mkdir -p $HOME/.gradle
echo 'systemProp.user.name=spring-builds+github' >> $HOME/.gradle/gradle.properties
echo 'systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false' >> $HOME/.gradle/gradle.properties
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
- name: Configure Toolchain Properties
if: ${{ matrix.java.toolchain }}
shell: bash
run: |
echo toolchainVersion=${{ matrix.java.toolchain }} >> $HOME/.gradle/gradle.properties
echo systemProp.org.gradle.java.installations.auto-detect=false >> $HOME/.gradle/gradle.properties
echo systemProp.org.gradle.java.installations.auto-download=false >> $HOME/.gradle/gradle.properties
echo systemProp.org.gradle.java.installations.paths=${{ format('$JAVA_HOME_{0}_X64', matrix.java.version) }} >> $HOME/.gradle/gradle.properties
- name: Run System Tests
id: run-system-tests
shell: bash
run: |
./gradlew systemTest
- name: Send Notification
uses: ./.github/actions/send-notification
if: always()
with:
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
status: ${{ job.status }}
build-scan-url: ${{ steps.run-system-tests.outputs.build-scan-url }}
run-name: ${{ format('{0} | System Tests | Java {2}', github.ref_name, matrix.java.version) }}

0 comments on commit 8e86c97

Please sign in to comment.