Skip to content

Commit

Permalink
added runtime test
Browse files Browse the repository at this point in the history
  • Loading branch information
Shweit committed Aug 23, 2024
1 parent 725551e commit e805e9a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main]

jobs:
test:
build:
name: Unit Tests
runs-on: ubuntu-latest

Expand All @@ -24,9 +24,6 @@ jobs:
- name: Build with Maven
run: mvn clean install

- name: Run Unit Tests
run: mvn test

checkstyle:
name: Checkstyle
runs-on: ubuntu-latest
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build with Maven and Do Runtime Test

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up JDK 16
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 21

- name: Maven Build
run: mvn clean package

- name: Upload the artifact
uses: actions/upload-artifact@v3
with:
name: artifact-${{ github.event.number }}
path: 'target/MinecraftServerAPI*.jar'

runtime-test:
name: Plugin Runtime Test
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- mcVersion: '1.16.5'
javaVersion: '16'
- mcVersion: '1.17.1'
javaVersion: '17'
- mcVersion: '1.18.2'
javaVersion: '18'
- mcVersion: '1.19.4'
javaVersion: '19'
- mcVersion: '1.20.1'
javaVersion: '20'
- mcVersion: '1.21'
javaVersion: '21'

steps:
- uses: FN-FAL113/[email protected]
with:
server-version: ${{ matrix.mcVersion }}
java-version: ${{ matrix.javaVersion }}
artifact-name: artifact-${{ github.event.number }}

0 comments on commit e805e9a

Please sign in to comment.