Skip to content

Imperative Configuration V2 #514

Imperative Configuration V2

Imperative Configuration V2 #514

Workflow file for this run

# File generated by the GradleUtils `setupGitHubActionsWorkflows` task, avoid modifying it directly
# The template can be found at https://github.com/neoforged/GradleUtils/blob/a65628b0c89dec60b357ce3f8f6bfa62934b8357/src/actionsTemplate/resources/.github/workflows/build-prs.yml
name: Build and test PRs
on:
pull_request:
types:
- synchronize
- opened
- ready_for_review
- reopened
push:
branches:
- 'feature/**'
workflow_dispatch:
jobs:
build:
name: Build
uses: neoforged/actions/.github/workflows/build-prs.yml@main
with:
java: 17
gradle_tasks: test
jar_compatibility: false
test-project:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
project: [testproject, legacytest]
runs-on: ${{ matrix.os }}
name: Test ${{ matrix.project }} on ${{ matrix.os }}
steps:
- name: Checkout project sources
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true
- uses: actions/setup-java@v4
with:
distribution: microsoft
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run build
run: ./gradlew build neoForgeIdeSync publish
working-directory: ./${{ matrix.project }}
- name: Ensure clean, build and test work in the same run
run: ./gradlew clean build check
working-directory: ./${{ matrix.project }}
- name: Ensure runData runs
run: ./gradlew runData
working-directory: ./${{ matrix.project }}