[Feature] Postgres Persistence #2959
This file contains hidden or 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
| name: Maven Pull Request Build | |
| on: | |
| pull_request: | |
| branches: | |
| - "*" | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@v7 | |
| with: | |
| # Disabling shallow clone is recommended for improving relevancy of reporting | |
| fetch-depth: 0 | |
| - name: Restore Cache - Maven Repository | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: | | |
| ~/.m2/repository | |
| ~/.sonar/cache | |
| key: pr-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| pr-${{ runner.os }}-maven | |
| ${{ runner.os }}-maven | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'adopt' | |
| java-version: 17 | |
| - name: Build with Maven | |
| env: | |
| ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | |
| ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
| run: | | |
| mvn test-compile -P build-ci --settings maven-ci-settings.xml -B | |
| - name: Test with Coverage | |
| if: ${{ github.event.pull_request.head.repo.fork == false }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | |
| ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
| run: | | |
| mvn install sonar:sonar -P coverage -Dsonar.projectKey=FraunhoferIOSB_FAAAST-Service --settings maven-ci-settings.xml -B | |
| - name: Get Date | |
| id: get-date | |
| run: | | |
| echo "date=$(/bin/date -u "+%Y-%m-%dT%H:%M:%S")" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Restore Cache - CVE Database | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: | | |
| ~/.m2/repository/org/owasp/dependency-check-data | |
| key: ${{ runner.os }}-maven-owasp-cvedb-${{ steps.get-date.outputs.date }} | |
| restore-keys: ${{ runner.os }}-maven-owasp-cvedb | |
| - name: Dependency Vulnerability Check with OWASP | |
| env: | |
| OWASP_OSS_INDEX_USERNAME: ${{ secrets.OWASP_OSS_INDEX_USERNAME }} | |
| OWASP_OSS_INDEX_APIKEY: ${{ secrets.OWASP_OSS_INDEX_APIKEY }} | |
| run: | | |
| mvn org.owasp:dependency-check-maven:aggregate -P owasp --settings maven-ci-settings.xml -Dmaven.plugin.dependency-check.autoUpdate=false -B |