From 657a5029d4650d12208dc48700058c72b2447aa9 Mon Sep 17 00:00:00 2001 From: Eir Nym <485399+eirnym@users.noreply.github.com> Date: Mon, 9 Jan 2023 22:57:29 +0100 Subject: [PATCH] Add spotless check and build with tests --- .github/workflows/build-ci.yml | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build-ci.yml diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml new file mode 100644 index 0000000000..35df2e8d23 --- /dev/null +++ b/.github/workflows/build-ci.yml @@ -0,0 +1,46 @@ +on: + push: + branches: + - main + pull_request: + types: [assigned, opened, synchronize, reopened] + +jobs: + buildTest: + name: Build CI + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java_version: [11, 17] + distribution: ["temurin"] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install JDK ${{ matrix.distribution }} ${{ matrix.java_version }} + uses: actions/setup-java@v3.9.0 + with: + distribution: ${{ matrix.distribution }} + java-version: ${{ matrix.java_version }} + cache: gradle + - name: Build project + run: ./gradlew build -x spotlessCheck + spotless: + name: Check Spotless + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java_version: [11] + distribution: ["temurin"] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install JDK ${{ matrix.distribution }} ${{ matrix.java_version }} + uses: actions/setup-java@v3.9.0 + with: + distribution: ${{ matrix.distribution }} + java-version: ${{ matrix.java_version }} + cache: gradle + - name: Check spotless + run: ./gradlew spotlessCheck