Skip to content

Merge pull request #468 from persistenceOne/puneet/remove-halving #301

Merge pull request #468 from persistenceOne/puneet/remove-halving

Merge pull request #468 from persistenceOne/puneet/remove-halving #301

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-coverage-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.23
- uses: actions/checkout@v4
- name: test & coverage report creation
run: |
make test
env:
TEST_TARGET: "./..."
TEST_ARGS: "-timeout 12m -race -coverprofile=./coverage.out -covermode=atomic -v"
- name: filter out DONTCOVER
if: github.event_name == 'pull_request'
run: |
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER' || true)"
excludelist+=" $(find ./ -type f -name '*.pb.go')"
excludelist+=" $(find ./ -type f -name '*.pb.gw.go')"
excludelist+=" $(find ./ -type f -path './tests/*.go')"
excludelist+=" $(find ./ -type f -path './x/interchainquery/*')"
excludelist+=" $(find ./ -type f -path './x/oracle/*')"
excludelist+=" $(find ./ -type f -path './x/lsm/*')"
excludelist+=" $(find ./ -type f -path './x/pob/*')"
excludelist+=" $(find ./ -type f -path './x/liquidstakeibc/*')"
excludelist+=" $(find ./ -type f -path './x/ratesync/*')"
excludelist+=" $(find ./ -type f -path './x/lscosmos/*')"
for filename in ${excludelist}; do
filename=$(echo $filename | sed 's/^.\///g')
echo "Excluding ${filename} from coverage report..."
sed -i "/$(echo $filename | sed 's/\//\\\//g')/d" ./coverage.out
done
- name: Convert coverage to lcov
if: github.event_name == 'pull_request'
uses: jandelgado/gcov2lcov-action@v1
- name: Coveralls
if: github.event_name == 'pull_request'
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
- name: Code Coverage Report
if: github.event_name == 'pull_request'
uses: vebr/jest-lcov-reporter@v0.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-file: coverage.lcov