-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from MTES-MCT/gradle-ci
CI - introduce gradle back build
- Loading branch information
Showing
12 changed files
with
157 additions
and
88 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
# branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 3 * * *" # 3am every night | ||
|
||
|
@@ -13,33 +14,59 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: "Setup Java JDK" | ||
uses: actions/setup-java@v2 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: "zulu" | ||
java-version: "17" | ||
java-package: jdk # optional (jdk or jre) - defaults to jdk | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
## Set up Maven Cache | ||
- name: Cache Maven packages | ||
uses: actions/cache@v1 | ||
- uses: gradle/[email protected] | ||
id: setup-gradle | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
gradle-version: wrapper | ||
|
||
- name: "Analyse dependencies" | ||
run: make back-check-dependencies | ||
- name: Print JAVA_HOME | ||
run: | | ||
echo "JAVA_HOME is $JAVA_HOME" | ||
echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV | ||
- name: "Tests" | ||
env: | ||
CI: true | ||
run: make back-test | ||
- name: build and test | ||
run: make back-build | ||
|
||
# - 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: "Tests" | ||
# env: | ||
# CI: true | ||
# run: make back-test | ||
|
||
# - name: "Check clean architecture" | ||
# run: make check-clean-archi | ||
|
||
- name: "Build" | ||
- name: "test maven" | ||
run: make back-test-mvn | ||
|
||
- name: "build maven" | ||
run: make back-build-mvn |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Dependency Review Action | ||
# | ||
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. | ||
# | ||
# Source repository: https://github.com/actions/dependency-review-action | ||
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement | ||
name: '[Analyse] Dependency Review' | ||
on: [ pull_request ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Dependency Review | ||
uses: actions/dependency-review-action@v4 | ||
with: | ||
fail-on-severity: critical |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: "Release" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
# push: | ||
# branches: [ "main" ] | ||
release: | ||
types: [ published ] | ||
|
||
|
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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