Skip to content

Merge pull request #3194 from nscuro/issue-3185 #50

Merge pull request #3194 from nscuro/issue-3185

Merge pull request #3194 from nscuro/issue-3185 #50

Workflow file for this run

name: Tests CI
on:
push:
branches:
- 'master' # Default branch
- '[0-9]+.[0-9]+.x' # Release branches
paths-ignore:
- '**/*.md'
- 'docs/**'
pull_request:
branches:
- 'master' # Default branch
- '[0-9]+.[0-9]+.x' # Release branches
paths-ignore:
- '**/*.md'
- 'docs/**'
workflow_dispatch:
# The following concurrency group cancels in-progress jobs or runs on pull_request events only;
# if github.head_ref is undefined, the concurrency group will fallback to the run ID,
# which is guaranteed to be both unique and defined for the run.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: { }
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
- name: Set up JDK
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # tag=v3.13.0
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Execute unit tests
run: |-
mvn clean
mvn test -P enhance
- name: Publish test coverage
if: ${{ github.ref == 'refs/heads/master' && contains(github.repository, 'DependencyTrack/') }}
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
language: Java
coverage-reports: target/jacoco-ut/jacoco.xml