generated from pagopa/pagopa-functions-template
-
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.
ops: using cache and 3.9.5 version about maven on workflow (#52)
* added mock upload contract * remove sparse checkout from code review * fetch-depth to 0 * test * add Run tests step * fix run tests * test * setup-maven-action * fix version * fix version * fix test value * cache-enabled tru * cache-enabled: true * test * enable cache * fix checkout ref * fix code review functions * use pin-github-action
- Loading branch information
Showing
7 changed files
with
43 additions
and
43 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
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 |
---|---|---|
|
@@ -22,18 +22,14 @@ jobs: | |
packages: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
apps/onboarding-functions | ||
libs/ | ||
test-coverage/ | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
- name: Setup Maven Action | ||
uses: s4u/setup-maven-action@fa2c7e4517ed008b1f73e7e0195a9eecf5582cd4 # [email protected] | ||
with: | ||
checkout-fetch-depth: 0 | ||
java-version: 17 | ||
distribution: 'temurin' | ||
java-distribution: 'temurin' | ||
maven-version: '3.9.5' | ||
cache-enabled: true | ||
|
||
- name: Build and analyze on Pull Requests | ||
shell: bash | ||
|
@@ -43,7 +39,7 @@ jobs: | |
-Dsonar.token=${{ secrets.SONAR_TOKEN }} | ||
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | ||
-Dsonar.pullrequest.branch=${{ github.head_ref }} | ||
-Dsonar.pullrequest.base=${{ github.base_ref }} | ||
-Dsonar.pullrequest.base=refs/remotes/origin/${{ github.base_ref }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
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 |
---|---|---|
|
@@ -22,13 +22,14 @@ jobs: | |
packages: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
- name: Setup Maven Action | ||
uses: s4u/setup-maven-action@fa2c7e4517ed008b1f73e7e0195a9eecf5582cd4 # [email protected] | ||
with: | ||
checkout-fetch-depth: 0 | ||
java-version: 17 | ||
distribution: 'temurin' | ||
java-distribution: 'temurin' | ||
maven-version: '3.9.5' | ||
cache-enabled: true | ||
|
||
- name: Build and analyze on Pull Requests | ||
shell: bash | ||
|
@@ -38,7 +39,7 @@ jobs: | |
-Dsonar.token=${{ secrets.SONAR_TOKEN }} | ||
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | ||
-Dsonar.pullrequest.branch=${{ github.head_ref }} | ||
-Dsonar.pullrequest.base=${{ github.base_ref }} | ||
-Dsonar.pullrequest.base=refs/remotes/origin/${{ github.base_ref }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
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 |
---|---|---|
|
@@ -12,9 +12,10 @@ on: | |
- reopened | ||
paths: | ||
- 'apps/onboarding-ms/**' | ||
|
||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
|
||
code-review: | ||
|
@@ -23,18 +24,14 @@ jobs: | |
packages: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
apps/onboarding-ms | ||
libs/ | ||
test-coverage/ | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
- name: Setup Maven Action | ||
uses: s4u/setup-maven-action@fa2c7e4517ed008b1f73e7e0195a9eecf5582cd4 # [email protected] | ||
with: | ||
checkout-fetch-depth: 0 | ||
java-version: 17 | ||
distribution: 'temurin' | ||
java-distribution: 'temurin' | ||
maven-version: '3.9.5' | ||
cache-enabled: true | ||
|
||
- name: Build and analyze on Pull Requests | ||
shell: bash | ||
|
@@ -44,7 +41,7 @@ jobs: | |
-Dsonar.token=${{ secrets.SONAR_TOKEN }} | ||
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | ||
-Dsonar.pullrequest.branch=${{ github.head_ref }} | ||
-Dsonar.pullrequest.base=${{ github.base_ref }} | ||
-Dsonar.pullrequest.base=refs/remotes/origin/${{ github.base_ref }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
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 |
---|---|---|
|
@@ -34,24 +34,23 @@ jobs: | |
build: | ||
name: Build Onboarding Functions | ||
runs-on: ubuntu-latest | ||
if: ${{ (github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == 'true') }} | ||
if: ${{ (github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true) }} | ||
environment: "${{ inputs.environment != null && inputs.environment || (github.base_ref == 'main' && 'prod' || (github.base_ref == 'develop' && 'uat' || 'dev')) }}-cd" | ||
permissions: | ||
packages: write | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout | ||
with: | ||
ref: ${{ github.ref_name }} | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
- name: Setup Maven Action | ||
uses: s4u/setup-maven-action@fa2c7e4517ed008b1f73e7e0195a9eecf5582cd4 # [email protected] | ||
with: | ||
checkout-fetch-depth: 0 | ||
checkout-ref: ${{ github.ref_name }} | ||
java-version: 17 | ||
distribution: 'temurin' | ||
java-distribution: 'temurin' | ||
maven-version: '3.9.5' | ||
cache-enabled: true | ||
|
||
- name: "Build Functions and dependencies" | ||
shell: bash | ||
|
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 |
---|---|---|
|
@@ -3,25 +3,26 @@ name: Release onboarding sdk | |
on: | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
setup: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3 | ||
with: | ||
ref: ${{ github.ref_name }} | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # pin@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: maven | ||
|
||
- uses: s4u/[email protected] | ||
- uses: s4u/maven-settings-action@60912582505985be4cc55d2b890eb32767f8de5f # pin@v2.8.0 | ||
with: | ||
servers: '[{"id": "selfcare-github", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}]' | ||
|
||
|
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