Skip to content

Commit

Permalink
add coverage to codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Oct 16, 2023
1 parent 3c3a6dd commit 835c6c7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
1 change: 1 addition & 0 deletions .codacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ exclude_paths:
- "README.md"
- ".github/**"
- "docs/**"
- "**/src/test/resources/**.sql"
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@ on:
branches:
- '!master'
- '!develop'
- '!release/*'
- 'dependabot/**'
- 'feature/**'
- 'bugfix/**'
- '!snapshot-producer'
- '**'

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
jdk: ['17.0.8']
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -25,7 +19,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
java-version: 17
cache: maven

- name: Prepare Maven Wrapper
Expand All @@ -44,3 +38,9 @@ jobs:
uses: codecov/codecov-action@v3
with:
token: "${{ secrets.CODECOV_TOKEN }}"

- name: Upload test coverage to Codacy
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
run: bash <(curl -Ls https://coverage.codacy.com/get.sh)
env:
CODACY_PROJECT_TOKEN: "${{secrets.CODACY_PROJECT_TOKEN}}"
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17.0.8
java-version: 17
distribution: 'zulu'
cache: maven
server-id: ossrh
Expand All @@ -50,7 +50,14 @@ jobs:
OSS_CENTRAL_USERNAME: "${{ secrets.SONATYPE_USERNAME }}"
OSS_CENTRAL_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"

- name: Upload coverage information
- name: Upload coverage information to CodeCov
uses: codecov/codecov-action@v3
with:
token: "${{ secrets.CODECOV_TOKEN }}"

- name: Upload test coverage to Codacy
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
run: bash <(curl -Ls https://coverage.codacy.com/get.sh)
env:
CODACY_PROJECT_TOKEN: "${{secrets.CODACY_PROJECT_TOKEN}}"

0 comments on commit 835c6c7

Please sign in to comment.