[Build & Test] Backend #61
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 & Test] Backend" | |
on: | |
# push: | |
# branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: "0 3 * * *" # 3am every night | |
jobs: | |
build-and-test-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Setup Java JDK" | |
uses: actions/setup-java@v2 | |
with: | |
distribution: "zulu" | |
java-version: "17" | |
java-package: jdk # optional (jdk or jre) - defaults to jdk | |
## Set up Maven Cache | |
- name: Cache Maven packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: "Analyse dependencies" | |
run: make back-check-dependencies | |
- name: "Tests" | |
env: | |
CI: true | |
run: make back-test | |
# - name: "Check clean architecture" | |
# run: make check-clean-archi | |
- name: "Build" | |
run: make back-build-mvn |