Allow specifying runServer timeout (#4)

This commit is contained in:
miozune 2022-07-28 22:04:57 +09:00 committed by GitHub
parent fc47f9623b
commit 17d7db2a88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,12 @@ name: Build and test
on:
workflow_call:
inputs:
timeout:
description: 'Timeout for runServer (seconds)'
required: false
default: 90
type: number
jobs:
build-and-test:
@ -37,11 +43,11 @@ jobs:
- name: Build the mod
run: ./gradlew build
- name: Run server for 1.5 minutes
- name: Run server for ${{ inputs.timeout }} seconds
run: |
mkdir run
echo "eula=true" > run/eula.txt
timeout 90 ./gradlew runServer 2>&1 | tee -a server.log || true
timeout ${{ inputs.timeout }} ./gradlew runServer 2>&1 | tee -a server.log || true
- name: Test no errors reported during server run
run: |