fix: Update test expectations for package rename #151
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: CD-CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| # Prevent concurrent builds | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| build: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.event.pusher.email != 'version-bump@flossware.org' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Updating runner | |
| run: sudo apt-get update | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| cache: 'maven' | |
| - name: Preparing settings.xml | |
| uses: s4u/maven-settings-action@v3.1.0 | |
| with: | |
| githubServer: false | |
| servers: | | |
| [ | |
| { | |
| "id": "packagecloud-flossware", | |
| "configuration": { | |
| "httpHeaders": { | |
| "property": { | |
| "name": "Authorization", | |
| "value": "Bearer ${{ secrets.PACKAGECLOUD_TOKEN }}" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| - name: Setup .gitconfig for version bumps | |
| uses: oleksiyrudenko/gha-git-credentials@v2.1.2 | |
| with: | |
| global: true | |
| name: 'Version Bump' | |
| email: 'version-bump@flossware.org' | |
| actor: 'VersionBump' | |
| token: '${{ secrets.GITHUB_TOKEN }}' | |
| - name: Incrementing pom.xml version | |
| run: "mvn -U build-helper:parse-version versions:set -DnewVersion=\\${parsedVersion.majorVersion}.\\${parsedVersion.nextMinorVersion} versions:commit" | |
| - name: Ensure latest dependencies in pom.xml | |
| run: "mvn -Dincludes='org.apache.commons:*, org.apache.cxf:*, org.junit.jupiter:*, org.mockito:*' -DgenerateBackupPoms=false versions:update-properties" | |
| - name: Building and testing | |
| run: "mvn -U clean install" | |
| - name: Publish Test Report | |
| uses: mikepenz/action-junit-report@v4.3.1 | |
| if: always() | |
| with: | |
| report_paths: '**/target/surefire-reports/TEST-*.xml' | |
| check_name: Test Results | |
| - name: Generate JaCoCo coverage report | |
| run: "mvn jacoco:report" | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4.6.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./target/site/jacoco/jacoco.xml | |
| flags: unittests | |
| name: codecov-flossware-jcommons | |
| fail_ci_if_error: false | |
| - name: Cache OWASP Dependency Check Database | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2/repository/org/owasp/dependency-check-data | |
| key: ${{ runner.os }}-owasp-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-owasp- | |
| - name: OWASP Dependency Check | |
| run: "mvn dependency-check:check -DfailBuildOnCVSS=7" | |
| - name: Upload dependency check report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: dependency-check-report | |
| path: target/dependency-check-report.html | |
| retention-days: 30 | |
| - name: Generate JavaDoc | |
| run: "mvn javadoc:javadoc" | |
| - name: Deploy JavaDoc to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./target/site/apidocs | |
| destination_dir: javadoc | |
| - name: Deploy to packagecloud.io | |
| run: "mvn -DskipTests deploy" | |
| - name: Checkin and tag to github | |
| run: "mvn scm:checkin scm:tag" |