Skip to content

Commit

Permalink
add github actions for build
Browse files Browse the repository at this point in the history
  • Loading branch information
laedanrex committed Aug 8, 2024
1 parent 0f8b093 commit 4325ed3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .ci/github-actions-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>vitam</id>
<username>${env.CI_USR}</username>
<password>${env.CI_PSW}</password>
</server>
<server>
<id>vitam-snapshots</id>
<username>${env.CI_USR}</username>
<password>${env.CI_PSW}</password>
</server>
<server>
<id>vitam-releases</id>
<username>${env.CI_USR}</username>
<password>${env.CI_PSW}</password>
</server>
</servers>
</settings>
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 4325ed3

Please sign in to comment.