Skip to content

Folia

Folia #98

Workflow file for this run

name: Java CI
# This workflow is used to verify pull requests. PRs should be:
# 1. Compilable (build)
# 2. Pass tests (test)
# 3. Follow our code formatting rules (spotlessCheck)
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Ensures we get all branches for comparison
# We need a working version of Java 21, 17, and 16 to test against.
- name: Set up JDK 16
uses: actions/setup-java@v3
with:
java-version: '16'
distribution: 'temurin'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
# devMode removes legacy versions (1.12.2 -> 1.16.5) from the gradle
# project, making these tests run faster.
- name: Update gradle.properties for devMode
run: |
sed -i 's/devMode=false/devMode=true/g' gradle.properties
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Run tests
run: ./gradlew test
- name: Run Spotless Check
run: ./gradlew spotlessCheck