Skip to content

Commit

Permalink
fix(service/java-client): add support for partial builds using codeco…
Browse files Browse the repository at this point in the history
…v flags

Signed-off-by: Sven Trieflinger <[email protected]>
  • Loading branch information
strieflin committed Jul 27, 2023
1 parent fbe2610 commit e352108
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/java-client.build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ jobs:
- name: Run Tests
run: mvn verify --activate-profiles coverage --batch-mode --no-transfer-progress
- name: Collect Jacoco reports
run: echo ::set-output name=reports::$(find . -regex '.*/target/site/jacoco/jacoco.xml' | tr '\n' ',' | sed 's/.$//')
run: echo ::set-output name=reports::$(find . -regex 'target/site/jacoco/jacoco.xml' | tr '\n' ',' | sed 's/.$//')
id: jacoco
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ steps.jacoco.outputs.reports }}
flags: java-client
name: codecov
2 changes: 2 additions & 0 deletions .github/workflows/service.build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@ jobs:
uses: codecov/codecov-action@v3
with:
name: codecov
files: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}/coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}
flags: service
13 changes: 13 additions & 0 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
flag_management:
default_rules:
carryforward: true
individual_flags:
- name: java-client
paths:
- ephemeral-java-client/
- name: service
paths:
- cmd/
- pkg/
fixes:
- "::src/"
1 change: 0 additions & 1 deletion ephemeral-java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<skip.tests>false</skip.tests>
<java.version>1.8</java.version>

Expand Down

0 comments on commit e352108

Please sign in to comment.