Multiverse-Core/.github/workflows/generic.test.yml
Jeremy Wood 542f321889
Merge remote-tracking branch 'origin/main' into MV5
# Conflicts:
#	.github/workflows/promote_release.yml
#	.github/workflows/release.yml
#	build.gradle
#	src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/listeners/MVPlayerListener.java
2023-08-28 15:31:34 -04:00

41 lines
1.0 KiB
YAML

name: 'Generic: Test'
on:
workflow_call:
inputs:
plugin_name:
description: 'Plugin name'
required: true
type: string
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Run unit tests
uses: gradle/gradle-build-action@v2
with:
arguments: build -x checkstyleMain -x checkstyleTest -x javadoc
env:
GITHUB_VERSION: pr${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Artifact output
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.plugin_name }}-pr${{ github.event.pull_request.number }}
path: build/libs/${{ inputs.plugin_name }}-pr${{ github.event.pull_request.number }}.jar