From 5971d8672719b8803f5db6ad699c106a6a46a1ed Mon Sep 17 00:00:00 2001 From: object-Object Date: Tue, 19 Mar 2024 19:22:44 -0400 Subject: [PATCH] Add GitHub Actions build workflow for checking pull requests --- .github/workflows/pr.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 000000000..19fd5b9fa --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,35 @@ +# mirror of the Jenkins pipeline, used for requiring PRs to build successfully before merging +# this uses Actions because it's easier to integrate with GitHub PRs, and to allow running the build on forks + +name: Build pull request + +on: + pull_request: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "17.0.1" + - uses: gradle/actions/setup-gradle@v3 + + - name: Clean + run: | + chmod +x gradlew + ./gradlew clean + + - name: Build + run: ./gradlew build + + - name: Run Datagen + run: ./gradlew runAllDatagen + + - name: Check Datagen + run: | + git add --intent-to-add . + git diff --name-only --exit-code -- ":!:*/src/generated/resources/.cache/*"