diff --git a/.github/workflows/build-and-test-backend.yml b/.github/workflows/build-and-test-backend.yml index d2171358f..779a5061f 100644 --- a/.github/workflows/build-and-test-backend.yml +++ b/.github/workflows/build-and-test-backend.yml @@ -1,14 +1,18 @@ name: "[Build & Test] Backend" on: - # push: - # branches: [ "main" ] + push: + branches: [ "main" ] pull_request: branches: [ "main" ] workflow_dispatch: schedule: - cron: "0 3 * * *" # 3am every night +permissions: + contents: write + pull-requests: write + jobs: build-and-test-backend: runs-on: ubuntu-latest @@ -21,16 +25,20 @@ jobs: distribution: temurin java-version: 17 - - uses: gradle/gradle-build-action@v2.9.0 - id: setup-gradle - with: - gradle-version: wrapper - - name: Print JAVA_HOME run: | echo "JAVA_HOME is $JAVA_HOME" echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV + - name: cd backend + run: cd backend + + - uses: gradle/gradle-build-action@v2.9.0 + id: setup-gradle + with: + gradle-version: wrapper + dependency-graph: generate-and-submit + - name: build and test run: make back-build diff --git a/.github/workflows/build-and-test-frontend.yml b/.github/workflows/build-and-test-frontend.yml index 6582de195..fe99d202b 100644 --- a/.github/workflows/build-and-test-frontend.yml +++ b/.github/workflows/build-and-test-frontend.yml @@ -1,10 +1,10 @@ name: "[Build & Test] Frontend" on: - # push: - # branches: [ "main" ] - # pull_request: - # branches: [ "main" ] + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] workflow_dispatch: schedule: - cron: "0 3 * * *" # 3am every night diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 812a8a335..a6a48d537 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -12,10 +12,10 @@ name: "[Analyse] CodeQL" on: - # push: - # branches: ["main"] - # pull_request: - # branches: [ "main" ] + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] schedule: - cron: "0 3 * * *" # 3am every night diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index fd59a8301..2ec3c3278 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -5,7 +5,9 @@ # 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 ] +on: + pull_request: + workflow_dispatch: permissions: contents: read diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 9a69f6cfd..b0f827ca5 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -31,9 +31,9 @@ name: "[Analyse] SonarCloud" on: # push: # branches: [ "main" ] - # pull_request: - # branches: [ "main" ] - # types: [ opened, synchronize, reopened ] + pull_request: + branches: [ "main" ] + types: [ opened, synchronize, reopened ] schedule: - cron: "0 3 * * *" # 3am every night workflow_dispatch: diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 80d3d0c1c..26b49f988 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -8,9 +8,8 @@ name: "[Analyse] Trivy" on: # push: # branches: [ "main" ] - # pull_request: - # # The branches below must be a subset of the branches above - # branches: [ "main" ] + pull_request: + branches: [ "main" ] workflow_dispatch: schedule: - cron: "0 3 * * *" # 3am every night diff --git a/Makefile b/Makefile index e938130d9..b4f1b94de 100644 --- a/Makefile +++ b/Makefile @@ -47,11 +47,14 @@ front-visualize-bundle: BACKEND_DIR := backend BACKEND_CONFIGURATION_FOLDER=$(shell pwd)/infra/configurations/backend/ -.PHONY: back-show-dependencies back-build back-test back-local +.PHONY: back-show-dependencies back-assemble back-build back-test back-local back-show-dependencies: cd $(BACKEND_DIR) && ./gradlew dependencies +back-assemble: + cd $(BACKEND_DIR) && ./gradlew assemble + back-build: cd $(BACKEND_DIR) && ./gradlew build