Skip to content

[Spring boot config] #9

[Spring boot config]

[Spring boot config] #9

Workflow file for this run

name: Spring mvn tests pipeline
on:
push:
branches:
- main
paths:
- spring/**
pull_request:
paths:
- spring/**
jobs:
build:
runs-on: ubuntu-latest
# services:
# db:
# image: mysql:8.0
# ports:
# - 3306:3306
# env:
# MYSQL_ROOT_PASSWORD: root_password
# MYSQL_DATABASE: foo
# MYSQL_USER: user1
# MYSQL_PASSWORD: user1_password
# options: >-
# --health-cmd "mysqladmin ping"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# steps:
# - name: Show Docker containers
# run: docker ps -a
# - name: Show databases for root user
# run: mysql --protocol=tcp -h localhost -P 3306 -u root -proot_password -e "SHOW DATABASES"
# - name: Show databases for user1
# run: mysql --protocol=tcp -h localhost -P 3306 -u user1 -puser1_password -e "SHOW DATABASES"
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Run mvn tests
working-directory: ./spring
run: mvn test
- name: Spring format check
working-directory: ./spring
run: mvn formatter:validate