[Build & Test] Backend #1376
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", "dev" ] | |
workflow_dispatch: | |
schedule: | |
- cron: "0 3 * * *" # 3am every night | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
build-and-test-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install and Build Backend | |
uses: ./.github/actions/install-and-build-backend | |
- name: "Tests & Coverage" | |
env: | |
CI: true | |
run: make back-test-coverage | |
- name: Add coverage to PR | |
id: jacoco | |
uses: madrapps/[email protected] | |
with: | |
paths: | | |
${{ github.workspace }}/**/backend/build/reports/jacoco/**/jacocoTestReport.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# - name: dependency-check | |
# uses: dependency-check/Dependency-Check_Action@main | |
# id: dependency-check | |
# env: | |
# JAVA_HOME: ${{ env.JAVA_HOME }} | |
# with: | |
# project: 'rapportnav' | |
# path: './backend' | |
# format: 'HTML' | |
# out: 'reports' # this is the default, no need to specify unless you wish to override it | |
# args: > | |
# --failOnCVSS 7 | |
# --enableRetired | |
# - name: Upload Test results | |
# uses: actions/upload-artifact@master | |
# with: | |
# name: dependency-check-report | |
# path: ${{github.workspace}}/reports | |
# - name: "Analyse dependencies" | |
# run: make back-check-dependencies | |
# - name: "Check clean architecture" | |
# run: make check-clean-archi | |