Codacy integration (#87)
This commit is contained in:
25
.github/workflows/pr_checks.yml
vendored
25
.github/workflows/pr_checks.yml
vendored
@ -37,3 +37,28 @@ jobs:
|
||||
run: ./gradlew assemble
|
||||
- name: Run Unit Tests
|
||||
run: ./gradlew test
|
||||
- name: Cache Coverage Results
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ./**/build/reports/jacoco
|
||||
key: ${{ runner.os }}-unit-${{ env.GITHUB_SHA }}
|
||||
upload-code-coverage:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- unit
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache Coverage Results
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ./**/build/reports/jacoco
|
||||
key: ${{ runner.os }}-unit-${{ env.GITHUB_SHA }}
|
||||
- name: Cache Coverage Results
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ./**/build/reports/jacoco
|
||||
key: ${{ runner.os }}-integration-${{ env.GITHUB_SHA }}
|
||||
- name: Publish code coverage to Codacy
|
||||
uses: codacy/codacy-coverage-reporter-action@v1
|
||||
with:
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
|
20
.github/workflows/publish.yml
vendored
20
.github/workflows/publish.yml
vendored
@ -24,3 +24,23 @@ jobs:
|
||||
run: ./gradlew publishAllPublicationsToGithubPackagesRepository
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
code-coverage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
- name: Run Unit Tests
|
||||
run: ./gradlew test
|
||||
- name: Publish code coverage to Codacy
|
||||
uses: codacy/codacy-coverage-reporter-action@v1
|
||||
with:
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
|
Reference in New Issue
Block a user