From 4325ed3d9c21e39ea144d716a306eecbd17588b0 Mon Sep 17 00:00:00 2001 From: Paris Alexandre Date: Thu, 8 Aug 2024 10:15:26 +0200 Subject: [PATCH] add github actions for build --- .ci/github-actions-settings.xml | 22 ++++++++++++++++++++++ .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .ci/github-actions-settings.xml create mode 100644 .github/workflows/build.yml diff --git a/.ci/github-actions-settings.xml b/.ci/github-actions-settings.xml new file mode 100644 index 00000000..591f95be --- /dev/null +++ b/.ci/github-actions-settings.xml @@ -0,0 +1,22 @@ + + + + vitam + ${env.CI_USR} + ${env.CI_PSW} + + + vitam-snapshots + ${env.CI_USR} + ${env.CI_PSW} + + + vitam-releases + ${env.CI_USR} + ${env.CI_PSW} + + + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..027b141f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: GitHub Actions Demo +run-name: Build launched by ${{ github.actor }} 🚀 +on: [push] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "17" + + - name: Build and Run Tests + run: mvn --settings .ci/github-actions-settings.xml verify + env: + SERVICE_NEXUS_URL: ${{ secrets.SERVICE_NEXUS_URL }} + CI_USR: ${{ secrets.CI_USR }} + CI_PSW: ${{ secrets.CI_PSW }} + + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() # always run even if the previous step fails + with: + report_paths: '**/build/test-results/test/TEST-*.xml'