Skip to content

Commit

Permalink
Problem: incorrect codecov reporting (fixes #278) (#922)
Browse files Browse the repository at this point in the history
Solution: add ignore for irrelevant paths; upload results from more integration tests
  • Loading branch information
tomtau authored Feb 9, 2023
1 parent fa69cca commit 802516e
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ ignore:
- "types/*.pb.go"
- "tests/*"
- "tests/**/*"
- "x/**/*.pb.go"
- "x/**/*.pb.go"
- "app/sim_test.go"
- "app/test_helpers.go"
1 change: 1 addition & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: govuln

on:
pull_request:
merge_group:
push:
branches:
- master
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build

on:
pull_request:
merge_group:
push:
branches:
- master
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/buildwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: BuildWin

on:
pull_request:
merge_group:
push:
branches:
- master
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:
- release/**
paths:
- "**.go"
merge_group:

jobs:
analyze:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/gosec.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Run Gosec
on:
pull_request:
merge_group:
push:
branches:
- master
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Lint
on:
pull_request:
merge_group:
push:
branches:
- master
Expand Down
89 changes: 84 additions & 5 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: nix flow
on:
pull_request:
merge_group:
push:
branches:
- master
Expand Down Expand Up @@ -38,12 +39,10 @@ jobs:
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: Run integration tests
run: make nix-integration-test
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.20.0
- name: Convert coverage data
run: go tool covdata textfmt -i=coverage -o profile.txt
run: |
nix profile install nixpkgs#go_1_20
go tool covdata textfmt -i=coverage -o profile.txt
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
Expand Down Expand Up @@ -93,6 +92,16 @@ jobs:
name: crypto-com
- name: Run integration tests
run: make nix-integration-test-upgrade
- name: Convert coverage data
run: |
nix profile install nixpkgs#go_1_20
go tool covdata textfmt -i=coverage -o profile.txt
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./profile.txt
flags: integration_tests_upgrade
- name: Tar debug files
if: failure()
run: tar cfz debug_files_upgrade.tar.gz -C /tmp/pytest-of-runner .
Expand All @@ -115,6 +124,16 @@ jobs:
name: crypto-com
- name: Run integration tests
run: make nix-integration-test-ledger
- name: Convert coverage data
run: |
nix profile install nixpkgs#go_1_20
go tool covdata textfmt -i=coverage -o profile.txt
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./profile.txt
flags: integration_tests_ledger
- name: Tar debug files
if: failure()
run: tar cfz debug_files_ledger.tar.gz -C /tmp/pytest-of-runner .
Expand All @@ -137,6 +156,16 @@ jobs:
name: crypto-com
- name: Run integration tests
run: make nix-integration-test-solomachine
- name: Convert coverage data
run: |
nix profile install nixpkgs#go_1_20
go tool covdata textfmt -i=coverage -o profile.txt
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./profile.txt
flags: integration_tests_solomachine
- name: Tar debug files
if: failure()
run: tar cfz debug_files_solomachine.tar.gz -C /tmp/pytest-of-runner .
Expand All @@ -159,6 +188,16 @@ jobs:
name: crypto-com
- name: Run integration tests
run: make nix-integration-test-slow
- name: Convert coverage data
run: |
nix profile install nixpkgs#go_1_20
go tool covdata textfmt -i=coverage -o profile.txt
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./profile.txt
flags: integration_tests_slow
- name: Tar debug files
if: failure()
run: tar cfz debug_files_slow.tar.gz -C /tmp/pytest-of-runner .
Expand All @@ -181,6 +220,16 @@ jobs:
name: crypto-com
- name: Run integration tests
run: make nix-integration-test-ibc
- name: Convert coverage data
run: |
nix profile install nixpkgs#go_1_20
go tool covdata textfmt -i=coverage -o profile.txt
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./profile.txt
flags: integration_tests_ibc
- name: Tar debug files
if: failure()
run: tar cfz debug_files_ibc.tar.gz -C /tmp/pytest-of-runner .
Expand All @@ -203,6 +252,16 @@ jobs:
name: crypto-com
- name: Run integration tests
run: make nix-integration-test-byzantine
- name: Convert coverage data
run: |
nix profile install nixpkgs#go_1_20
go tool covdata textfmt -i=coverage -o profile.txt
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./profile.txt
flags: integration_tests_byzantine
- name: Tar debug files
if: failure()
run: tar cfz debug_files_byzantine.tar.gz -C /tmp/pytest-of-runner .
Expand All @@ -225,6 +284,16 @@ jobs:
name: crypto-com
- name: Run integration tests
run: make nix-integration-test-gov
- name: Convert coverage data
run: |
nix profile install nixpkgs#go_1_20
go tool covdata textfmt -i=coverage -o profile.txt
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./profile.txt
flags: integration_tests_gov
- name: Tar debug files
if: failure()
run: tar cfz debug_files_gov.tar.gz -C /tmp/pytest-of-runner .
Expand All @@ -248,6 +317,16 @@ jobs:
name: crypto-com
- name: Run integration tests
run: make nix-integration-test-grpc
- name: Convert coverage data
run: |
nix profile install nixpkgs#go_1_20
go tool covdata textfmt -i=coverage -o profile.txt
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./profile.txt
flags: integration_tests_grpc
- name: Tar debug files
if: failure()
run: tar cfz debug_files_grpc.tar.gz -C /tmp/pytest-of-runner .
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Semgrep
on:
# Scan changed files in PRs, block on new issues only (existing issues ignored)
pull_request: {}
merge_group:
push:
branches:
- master
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/staticmajor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Staticmajor
on:
pull_request:
merge_group:
push:
branches:
- master
Expand Down

0 comments on commit 802516e

Please sign in to comment.