mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-12-04 08:23:26 +01:00
37 lines
985 B
YAML
37 lines
985 B
YAML
name: Run unit tests against all PRs
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
|
|
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: multiverse-core-pr${{ github.event.pull_request.number }}
|
|
path: build/libs/multiverse-core-pr${{ github.event.pull_request.number }}.jar
|