Skip to content

docs: add CI pipeline for automated build and test, including spotless #1

docs: add CI pipeline for automated build and test, including spotless

docs: add CI pipeline for automated build and test, including spotless #1

name: Build and Test

Check failure on line 1 in .github/workflows/build-and-test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-and-test.yml

Invalid workflow file

(Line: 5, Col: 7): A sequence was not expected, (Line: 8, Col: 9): A sequence was not expected
on:
push:
branches:
- ["main"]
pull_request:
branches:
- ["main"]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
# Checks out code from GitHub
- name: Checkout code
uses: actions/checkout@v6
# Sets up Java 25 (Temurin) and cache Maven-dependencies
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
cache: 'maven'
# Make sure Maven Wrapper is executable
- name: Make mvnm executable
run: chmod +x mvnw
# Compile and run tests
- name: Compile and run tests
run: ./mvnw -B tests
# Control code format with spotless
- name: Run spotless check
run: ./mvnw -B spotless:check