Files
OpenMMO/.github/workflows/test.yml
T

42 lines
1.1 KiB
YAML

name: Test
on:
workflow_run:
workflows: [ "Spotless" ]
types: [ completed ]
push:
branches: [ "master" ]
permissions:
contents: read
concurrency:
group: test-${{ github.event.workflow_run.head_branch || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
# workflow_run starts from the default branch, so check out the branch Spotless just ran
# on. Its tip, not head_sha, since Spotless pushes its formatting as a new commit.
ref: ${{ github.event.workflow_run.head_branch || github.sha }}
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '25'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run checks
run: ./gradlew check