mirror of
https://github.com/AthanorLabs/atomic-swap.git
synced 2026-01-08 21:58:07 -05:00
switch to codecov-action@v3 for uploading code coverage (#334)
This commit is contained in:
7
.github/workflows/unit-tests.yml
vendored
7
.github/workflows/unit-tests.yml
vendored
@@ -61,5 +61,8 @@ jobs:
|
||||
ETH_MAINNET_ENDPOINT: ${{ secrets.ETH_MAINNET_ENDPOINT }}
|
||||
run: ./scripts/run-unit-tests.sh
|
||||
|
||||
- name: Run coverage
|
||||
run: bash <(curl -s https://codecov.io/bash)
|
||||
- name: Upload code coverage
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
verbose: true
|
||||
fail_ci_if_error: true
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -16,7 +16,7 @@
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool
|
||||
/coverage.out
|
||||
/coverage.txt
|
||||
/coverage.html
|
||||
|
||||
# Logs from make targets
|
||||
|
||||
7
codecov.yml
Normal file
7
codecov.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
# Don't calculate code coverage percentages on generated abigen files
|
||||
ignore:
|
||||
- ethereum/swap_factory.go
|
||||
- ethereum/aggregator_v3_interface.go
|
||||
- ethereum/erc20_mock.go
|
||||
- ethereum/ierc20.go
|
||||
- ethereum/block/ut_contract_test.go
|
||||
@@ -10,12 +10,12 @@ start-ganache
|
||||
|
||||
# run unit tests
|
||||
echo "running unit tests..."
|
||||
rm -f coverage.out
|
||||
go test ./... -v -short -timeout=30m -count=1 -covermode=atomic -coverprofile=coverage.out
|
||||
rm -f coverage.txt
|
||||
go test ./... -v -short -timeout=30m -count=1 -covermode=atomic -coverprofile=coverage.txt
|
||||
OK=$?
|
||||
|
||||
if [[ -e coverage.out ]]; then
|
||||
go tool cover -html=coverage.out -o coverage.html
|
||||
if [[ -e coverage.txt ]]; then
|
||||
go tool cover -html=coverage.txt -o coverage.html
|
||||
fi
|
||||
|
||||
stop-monerod-regtest
|
||||
|
||||
@@ -560,7 +560,7 @@ func (s *IntegrationTestSuite) testAbortXMRTakerCancels(asset types.EthAsset) {
|
||||
// namespace (the namespace for swapd hosts providing XMR offers). We need
|
||||
// to wait a little extra before Alice calls Discover to ensure that the
|
||||
// advertisement went out.
|
||||
common.SleepWithContext(ctx, time.Millisecond*500)
|
||||
common.SleepWithContext(ctx, time.Second)
|
||||
|
||||
peerIDs, err := ac.Discover(string(coins.ProvidesXMR), defaultDiscoverTimeout)
|
||||
require.NoError(s.T(), err)
|
||||
|
||||
Reference in New Issue
Block a user