This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into MCIL-23-update-terminal
- Loading branch information
Showing
9 changed files
with
491 additions
and
116 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Check OpenApi version | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/main/resources/META-INF/openapi.yaml' | ||
|
||
jobs: | ||
checkOpenApi: | ||
name: Diff with main | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the source code | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: Get the branch openapi version | ||
id: branch_openapi_version | ||
uses: mikefarah/yq@c35ec752e38ea0c096d3c44e13cfc0797ac394d8 #v4.43.1 | ||
with: | ||
cmd: yq '.info.version' src/main/resources/META-INF/openapi.yaml | ||
|
||
- name: Download openapi main | ||
run: wget https://raw.githubusercontent.com/pagopa/mil-terminal-registry/main/src/main/resources/META-INF/openapi.yaml | ||
|
||
- name: Get the main openapi version | ||
id: main_openapi_version | ||
uses: mikefarah/yq@c35ec752e38ea0c096d3c44e13cfc0797ac394d8 #v4.43.1 | ||
with: | ||
cmd: yq '.info.version' openapi.yaml | ||
|
||
- name: Fail if versions are equals | ||
if: steps.branch_openapi_version.output.result == steps.main_openapi_version.output.result | ||
run: exit 1 |
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,87 @@ | ||
name: Pull request review | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
env: | ||
TARGET_PLATFORMS: linux/amd64 | ||
|
||
jobs: | ||
postman_test: | ||
name: Postamn test | ||
runs-on: ubuntu-latest | ||
environment: dev-cd | ||
|
||
permissions: | ||
id-token: write | ||
packages: write | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout the source code | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | ||
with: | ||
token: ${{ secrets.GIT_GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 #v3.0.0 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 #v3.0.0 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 | ||
with: | ||
distribution: 'corretto' | ||
java-version: '21' | ||
cache: 'gradle' | ||
|
||
- name: Log in to the Container registry | ||
id: docker_login | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d #v3.0.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.BOT_WRITE_PACKAGE_TOKEN }} | ||
|
||
- name: Login to Azure | ||
uses: azure/login@8c334a195cbb38e46038007b304988d888bf676a #v2.0.0 | ||
with: | ||
client-id: ${{ secrets.AZURE_CD_IDENTITY_CLIENT_ID }} | ||
tenant-id: ${{ secrets.AZURE_CD_IDENTITY_TENANT_ID }} | ||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
|
||
# | ||
# RELEASE CANDIDATE - Execute unit-test + Calculate test coverage + SCA with Sonar. | ||
# | ||
- name: RELEASE CANDIDATE - Execute unit-test + Calculate test coverage + Sonar | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: ./gradlew clean build jacocoTestReport jacocoTestCoverageVerification sonar | ||
|
||
# | ||
# Install Node. | ||
# | ||
- name: Install Node | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c | ||
with: | ||
node-version: "18.16.0" | ||
|
||
# | ||
# Install Newman. | ||
# | ||
- name: Install Newman | ||
run: npm install -g newman | ||
|
||
# | ||
# Run Postman collection. | ||
# | ||
- name: Run Postman collection | ||
run: newman run src/test/postman/mil-terminal-registry.postman_collection.json -e src/test/postman/dev.postman_environment.json --env-var "tr_token_client_id=${{ secrets.NEWMAN_IT__TR_TOKEN_CLIENT_ID }}" --env-var "tr_token_client_secret=${{ secrets.NEWMAN_IT__TR_TOKEN_CLIENT_SECRET }}" |
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,3 @@ | ||
{ | ||
"java.configuration.updateBuildConfiguration": "interactive" | ||
} |
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
Oops, something went wrong.