actions: fix test-importer workflow (#410)
* actions: fix test-importer workflow * update gitignore
This commit is contained in:
parent
cc6b5d04f2
commit
8789a04998
34
.github/workflows/test.yml
vendored
34
.github/workflows/test.yml
vendored
@ -193,20 +193,20 @@ jobs:
|
||||
file: ./coverage.txt
|
||||
fail_ci_if_error: true
|
||||
if: "env.GIT_DIFF != ''"
|
||||
# TODO: remove tmp dir to fix this
|
||||
# test-importer:
|
||||
# runs-on: ubuntu-latest
|
||||
# timeout-minutes: 10
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
# - uses: technote-space/get-diff-action@v1
|
||||
# id: git_diff
|
||||
# with:
|
||||
# SUFFIX_FILTER: |
|
||||
# .go
|
||||
# .mod
|
||||
# .sum
|
||||
# - name: importer-test
|
||||
# run: |
|
||||
# make test-import
|
||||
# if: "env.GIT_DIFF != ''"
|
||||
|
||||
test-importer:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
id: git_diff
|
||||
with:
|
||||
SUFFIX_FILTER: |
|
||||
.go
|
||||
.mod
|
||||
.sum
|
||||
- name: test-importer
|
||||
run: |
|
||||
make test-import
|
||||
if: "env.GIT_DIFF != ''"
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -33,6 +33,7 @@ golangci-lint
|
||||
coverage.txt
|
||||
*.out
|
||||
sim_log_file
|
||||
importer/tmp
|
||||
|
||||
# Vagrant
|
||||
.vagrant/
|
||||
|
1
Makefile
1
Makefile
@ -150,6 +150,7 @@ test-race:
|
||||
test-import:
|
||||
@go test ./importer -v --vet=off --run=TestImportBlocks --datadir tmp \
|
||||
--blockchain blockchain --timeout=10m
|
||||
rm -rf importer/tmp
|
||||
|
||||
test-rpc:
|
||||
./scripts/integration-test-all.sh -q 1 -z 1 -s 2
|
||||
|
@ -207,7 +207,10 @@ func TestImportBlocks(t *testing.T) {
|
||||
blockchainInput, err := os.Open(flagBlockchain)
|
||||
require.Nil(t, err)
|
||||
|
||||
defer require.NoError(t, blockchainInput.Close())
|
||||
defer func() {
|
||||
err := blockchainInput.Close()
|
||||
require.NoError(t, err)
|
||||
}()
|
||||
|
||||
// ethereum mainnet config
|
||||
chainContext := core.NewChainContext()
|
||||
|
Loading…
Reference in New Issue
Block a user