1234567891011121314151617181920212223242526272829303132333435 |
- name: Build
- on:
- push:
- pull_request_target:
- types: [labeled]
- env:
- JAVA_VERSION: 17
- defaults:
- run:
- shell: bash
- jobs:
- test:
- name: Compile and Test
- runs-on: ubuntu-latest
- if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-java@v2
- with:
- distribution: 'temurin'
- java-version: ${{ env.JAVA_VERSION }}
- cache: 'maven'
- - name: Build and Test
- run: mvn -B clean install jacoco:report -Pcoverage,dependency-check
- - name: Upload code coverage report
- id: codacyCoverageReporter
- if: "github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'pr:safe')"
- run: bash <(curl -Ls https://coverage.codacy.com/get.sh)
- env:
- CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
- continue-on-error: true
|