Build #666
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ "main", "dev" ] | |
pull_request: | |
branches: [ "main", "dev" ] | |
merge_group: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: 'maven' | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Setup Services | |
run: doc/script/dependency-start.sh | |
- name: Build with Maven | |
run: ./mvnw install | |
- name: Check uncommitted changes to ensure format applied | |
run: | | |
if [[ -n $(git status --porcelain) ]]; then | |
git status | |
echo "There are uncommitted changes. Please run './mvnw spotless:apply' and commit the changes." | |
exit 1 | |
else | |
echo "No uncommitted changes." | |
fi | |
- name: Test Legacy Service | |
run: sudo docker exec cheese_legacy pnpm test | |
- name: Upload jar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jar | |
path: target/*.jar | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: target/site/jacoco |