mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 12:17:00 -05:00
- Change LayeredMappingSpecBuilderTest with new hashes, we inject our custom license options, that changes the hash. Signed-off-by: shedaniel <daniel@shedaniel.me>
97 lines
2.5 KiB
YAML
97 lines
2.5 KiB
YAML
name: Run Tests
|
|
on: [ push, pull_request ]
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
gradle: [ 7.0.1 ]
|
|
java: [ jdk16 ]
|
|
jvm: [ hotspot ]
|
|
runs-on: ubuntu-20.04
|
|
container:
|
|
image: gradle:${{ matrix.gradle }}-${{ matrix.java }}
|
|
options: --user root
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: gradle/wrapper-validation-action@v1
|
|
- run: gradle build check -x test --stacktrace
|
|
|
|
# This job is used to feed the test matrix of next job to allow the tests to run in parallel
|
|
prepare_test_matrix:
|
|
# Lets wait to ensure it builds before going running tests
|
|
needs: build
|
|
|
|
runs-on: ubuntu-20.04
|
|
container:
|
|
image: gradle:7.0.1-jdk16
|
|
options: --user root
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: gradle writeActionsTestMatrix --stacktrace
|
|
- id: set-matrix
|
|
run: echo "::set-output name=matrix::$(cat build/test_matrix.json)"
|
|
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
|
|
run_tests:
|
|
needs: prepare_test_matrix
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
java: [ jdk16 ]
|
|
test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }}
|
|
exclude:
|
|
- java: jdk16
|
|
test: net.fabricmc.loom.test.integration.KotlinTest
|
|
|
|
runs-on: ubuntu-20.04
|
|
container:
|
|
image: gradle:7.0.0-${{ matrix.java }}
|
|
options: --user root
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: gradle test --tests ${{ matrix.test }} --stacktrace
|
|
env:
|
|
TEST_WARNING_MODE: fail
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
if: ${{ failure() }}
|
|
with:
|
|
name: ${{ matrix.test }} (${{ matrix.java }}) Results
|
|
path: build/reports/
|
|
|
|
run_tests_windows:
|
|
needs: prepare_test_matrix
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
java: [ 16 ]
|
|
test: ${{ fromJson(needs.prepare_test_matrix.outputs.matrix) }}
|
|
exclude:
|
|
- java: 16
|
|
test: net.fabricmc.loom.test.integration.KotlinTest
|
|
|
|
runs-on: windows-2019
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: setup jdk ${{ matrix.java }}
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: ${{ matrix.java }}
|
|
- run: ./gradlew test --tests ${{ matrix.test }} --stacktrace
|
|
env:
|
|
TEST_WARNING_MODE: fail
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
if: ${{ failure() }}
|
|
with:
|
|
name: ${{ matrix.test }} (${{ matrix.java }}) Results
|
|
path: build/reports/
|