2023-08-22 15:35:10 +02:00
|
|
|
name: 'PR: Test'
|
2023-02-20 01:36:20 +01:00
|
|
|
|
|
|
|
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: '11'
|
|
|
|
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
|
|
|
|
env:
|
2023-03-03 16:28:55 +01:00
|
|
|
GITHUB_VERSION: pr${{ github.event.pull_request.number }}
|
2023-02-20 01:36:20 +01:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-03-03 16:21:36 +01:00
|
|
|
|
|
|
|
- name: Artifact output
|
2023-03-03 16:28:55 +01:00
|
|
|
uses: actions/upload-artifact@v3
|
2023-03-03 16:21:36 +01:00
|
|
|
with:
|
2023-03-03 16:28:55 +01:00
|
|
|
name: multiverse-core-pr${{ github.event.pull_request.number }}
|
|
|
|
path: build/libs/multiverse-core-pr${{ github.event.pull_request.number }}.jar
|