https://github.com/geometrically/fabric-test-runner
A test runner for mods using the fabric framework allowing for Minecraft Mods to use CI/CD!
https://github.com/geometrically/fabric-test-runner
Last synced: over 1 year ago
JSON representation
A test runner for mods using the fabric framework allowing for Minecraft Mods to use CI/CD!
- Host: GitHub
- URL: https://github.com/geometrically/fabric-test-runner
- Owner: Geometrically
- License: mit
- Created: 2020-04-27T01:26:43.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T15:06:06.000Z (over 3 years ago)
- Last Synced: 2025-03-01T17:37:45.263Z (over 1 year ago)
- Language: JavaScript
- Size: 383 KB
- Stars: 23
- Watchers: 3
- Forks: 2
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fabric Test Runner
Welcome to the Fabric Test Runner, a custom GitHub action created for Fabric mods to easily run tests!
#### Currently Supported Tests:
- Gradle Build Test
- Gradle Run Server
## Usage
Not used to actions? Create a file in ./github/workflows called main.yml . Set the yaml file to the example below!
Using the Fabric Test Runner is extremely simple. Here's some simple functionality, testing the mod on 20w17a, and
uploading the build artifacts!
```yaml
name: Fabric CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
runTests:
runs-on: ubuntu-latest
steps:
- name: "Checkout Project"
uses: actions/checkout@v2
with:
lfs: true
- name: "Run Fabric Tests"
uses: Geometrically/fabric-test-runner@v1
with:
minecraftVersion: 20w17a
- name: "Upload Artifact"
uses: actions/upload-artifact@v1
with:
name: Builds
path: build/libs
```
Want some more advanced functionality? Below is the Fabric Test Runner running tests for 1.15.2 and the latest version.
```yaml
name: Fabric CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
buildAndRunForSomeVersions:
name: Run tests for ${{ matrix.minecraftVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
minecraftVersion:
- 1.15.2
- latest
steps:
- uses: actions/checkout@v2
with:
lfs: true
- uses: Geometrically/fabric-test-runner@v1
id: testRunner
with:
minecraftVersion: ${{ matrix.minecraftVersion }}
- uses: actions/upload-artifact@v1
with:
name: Builds
path: build/libs
```
Other options:
The Fabric Test Runner several other options that were not used in the examples:
- `runBuildTest` (true/false) - Whether the action should run the build test
- `runServerTest` (true/false) - Whether the action should run the server test. Useful for client-only mods.