Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Dependencies updated. #28

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 6 additions & 77 deletions .github/workflows/build_n_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,93 +5,22 @@ on:

jobs:
build_n_deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
#
# Checkout the source code.
#
- name: Checkout the source code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
token: ${{ secrets.GIT_PAT }}
fetch-depth: 0

#
# Cache JDK.
#
- name: Cache JDK
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
id: cache-jdk
with:
key: OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz
path: |
${{ runner.temp }}/jdk_setup.tar.gz
${{ runner.temp }}/jdk_setup.sha256

#
# Download JDK and verify its hash.
#
- name: Download JDK and verify its hash
if: steps.cache-jdk.outputs.cache-hit != 'true'
run: |
echo "454bebb2c9fe48d981341461ffb6bf1017c7b7c6e15c6b0c29b959194ba3aaa5 ${{ runner.temp }}/jdk_setup.tar.gz" >> ${{ runner.temp }}/jdk_setup.sha256
curl -L "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz" -o "${{ runner.temp }}/jdk_setup.tar.gz"
sha256sum --check --status "${{ runner.temp }}/jdk_setup.sha256"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2

#
# Setup JDK.
#
- name: Setup JDK
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2
- name: Setup Java Build Environment
uses: pagopa/mil-actions/setup-java-build-env@6dba0fb019f2714767a0b7954fb12ebd7ec0aa3e # 1.0.0
with:
distribution: "jdkfile"
jdkFile: "${{ runner.temp }}/jdk_setup.tar.gz"
java-version: "21"
cache: maven

#
# Cache Maven.
#
- name: Cache Maven
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
id: cache-maven
with:
key: apache-maven-3.9.6-bin.tar.gz
path: |
${{ runner.temp }}/maven_setup.tar.gz
${{ runner.temp }}/maven_setup.sha256

#
# Download Maven and verify its hash.
#
- name: Download Maven and verify its hash
if: steps.cache-maven.outputs.cache-hit != 'true'
run: |
echo "6eedd2cae3626d6ad3a5c9ee324bd265853d64297f07f033430755bd0e0c3a4b ${{ runner.temp }}/maven_setup.tar.gz" >> ${{ runner.temp }}/maven_setup.sha256
curl -L "https://archive.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz" -o "${{ runner.temp }}/maven_setup.tar.gz"
sha256sum --check --status "${{ runner.temp }}/maven_setup.sha256"

#
# Setup Maven.
#
- name: Setup Maven
run: |
mkdir ${{ runner.temp }}/maven
tar -xvf ${{ runner.temp }}/maven_setup.tar.gz -C ${{ runner.temp }}/maven --strip-components=1
echo "<settings><servers><server><id>github</id><username>${{ secrets.GIT_USER }}</username><password>${{ secrets.GIT_PAT }}</password></server></servers></settings>" >> ${{ runner.temp }}/settings.xml
gh_user: ${{ secrets.GIT_USER }}
gh_token: ${{ secrets.GIT_PAT }}

#
# Build and deploy.
#
- name: Build and deploy
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ${{ runner.temp }}/maven/bin/mvn --batch-mode deploy -Pvalidate -s ${{ runner.temp }}/settings.xml --no-transfer-progress

#
# Build and deploy site.
#
- name: Build and deploy site
run: ${{ runner.temp }}/maven/bin/mvn --batch-mode site -s ${{ runner.temp }}/settings.xml --no-transfer-progress
89 changes: 0 additions & 89 deletions .github/workflows/build_n_deploy_site.yml

This file was deleted.

78 changes: 7 additions & 71 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,79 +11,15 @@ on:

jobs:
pr-validation:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: PR title validation
uses: amannn/action-semantic-pull-request@c3cd5d1ea3580753008872425915e343e351ab54
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
docs
refactor
chore
fix
feat
breaking
requireScope: false
subjectPattern: ^[A-Z].+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
doesn't match the configured pattern. Please ensure that the subject
starts with an uppercase character.
wip: false

- name: Checkout the source code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab

- name: Cache JDK
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
id: cache-jdk
with:
key: OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz
path: |
${{ runner.temp }}/jdk_setup.tar.gz
${{ runner.temp }}/jdk_setup.sha256

- name: Download JDK and verify its hash
if: steps.cache-jdk.outputs.cache-hit != 'true'
run: |
echo "454bebb2c9fe48d981341461ffb6bf1017c7b7c6e15c6b0c29b959194ba3aaa5 ${{ runner.temp }}/jdk_setup.tar.gz" >> ${{ runner.temp }}/jdk_setup.sha256
curl -L "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jdk_x64_linux_hotspot_21.0.2_13.tar.gz" -o "${{ runner.temp }}/jdk_setup.tar.gz"
sha256sum --check --status "${{ runner.temp }}/jdk_setup.sha256"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2

- name: Setup JDK
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2
- name: PR validation
uses: pagopa/mil-actions/pr-validation@6dba0fb019f2714767a0b7954fb12ebd7ec0aa3e # 1.0.0
with:
distribution: "jdkfile"
jdkFile: "${{ runner.temp }}/jdk_setup.tar.gz"
java-version: "21"
cache: maven

- name: Cache Maven
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
id: cache-maven
with:
key: apache-maven-3.9.6-bin.tar.gz
path: |
${{ runner.temp }}/maven_setup.tar.gz
${{ runner.temp }}/maven_setup.sha256

- name: Download Maven and verify its hash
if: steps.cache-maven.outputs.cache-hit != 'true'
run: |
echo "6eedd2cae3626d6ad3a5c9ee324bd265853d64297f07f033430755bd0e0c3a4b ${{ runner.temp }}/maven_setup.tar.gz" >> ${{ runner.temp }}/maven_setup.sha256
curl -L "https://archive.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz" -o "${{ runner.temp }}/maven_setup.tar.gz"
sha256sum --check --status "${{ runner.temp }}/maven_setup.sha256"

- name: Setup Maven
run: |
mkdir ${{ runner.temp }}/maven
tar -xvf ${{ runner.temp }}/maven_setup.tar.gz -C ${{ runner.temp }}/maven --strip-components=1
echo "<settings><servers><server><id>github</id><username>${{ secrets.GIT_USER }}</username><password>${{ secrets.GIT_PAT }}</password></server></servers></settings>" >> ${{ runner.temp }}/settings.xml

- name: Execute unit-test + Calculate test coverage + SCA with Sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ${{ runner.temp }}/maven/bin/mvn verify -Pvalidate -s ${{ runner.temp }}/settings.xml --no-transfer-progress
gh_user: ${{ secrets.GIT_USER }}
gh_token: ${{ secrets.GIT_PAT }}
sonar_token: ${{ secrets.SONAR_TOKEN }}
Loading
Loading