generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 10
40 lines (35 loc) · 1.16 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Run Test Suite
on:
# pull_request: This workflow will be triggered when new commits are pushed onto GitHub
# ref: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
pull_request:
# This is the default value of this event
types: [opened, reopened, synchronize]
# workflow_call: Or it will be triggered by release workflow
# ref: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_call
workflow_call:
inputs:
jdk-version:
default: '21'
required: false
type: string
version:
default: 'latest'
required: false
type: string
jobs:
# Only run test job if we want to build latest version
test:
name: Run Test Suite
if: ${{ !inputs.version || inputs.version == 'latest' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.jdk-version || '21' }}
distribution: 'temurin'
cache: 'gradle'
- name: Run Unit Test Suite
run: ./gradlew :common:test