actions: fix test-importer workflow (#410)

* actions: fix test-importer workflow

* update gitignore
This commit is contained in:
Federico Kunze 2020-07-24 20:54:25 +02:00 committed by GitHub
parent cc6b5d04f2
commit 8789a04998
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 18 deletions

View File

@ -193,20 +193,20 @@ jobs:
file: ./coverage.txt file: ./coverage.txt
fail_ci_if_error: true fail_ci_if_error: true
if: "env.GIT_DIFF != ''" if: "env.GIT_DIFF != ''"
# TODO: remove tmp dir to fix this
# test-importer: test-importer:
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# timeout-minutes: 10 timeout-minutes: 10
# steps: steps:
# - uses: actions/checkout@v2 - uses: actions/checkout@v2
# - uses: technote-space/get-diff-action@v1 - uses: technote-space/get-diff-action@v1
# id: git_diff id: git_diff
# with: with:
# SUFFIX_FILTER: | SUFFIX_FILTER: |
# .go .go
# .mod .mod
# .sum .sum
# - name: importer-test - name: test-importer
# run: | run: |
# make test-import make test-import
# if: "env.GIT_DIFF != ''" if: "env.GIT_DIFF != ''"

1
.gitignore vendored
View File

@ -33,6 +33,7 @@ golangci-lint
coverage.txt coverage.txt
*.out *.out
sim_log_file sim_log_file
importer/tmp
# Vagrant # Vagrant
.vagrant/ .vagrant/

View File

@ -150,6 +150,7 @@ test-race:
test-import: test-import:
@go test ./importer -v --vet=off --run=TestImportBlocks --datadir tmp \ @go test ./importer -v --vet=off --run=TestImportBlocks --datadir tmp \
--blockchain blockchain --timeout=10m --blockchain blockchain --timeout=10m
rm -rf importer/tmp
test-rpc: test-rpc:
./scripts/integration-test-all.sh -q 1 -z 1 -s 2 ./scripts/integration-test-all.sh -q 1 -z 1 -s 2

View File

@ -207,7 +207,10 @@ func TestImportBlocks(t *testing.T) {
blockchainInput, err := os.Open(flagBlockchain) blockchainInput, err := os.Open(flagBlockchain)
require.Nil(t, err) require.Nil(t, err)
defer require.NoError(t, blockchainInput.Close()) defer func() {
err := blockchainInput.Close()
require.NoError(t, err)
}()
// ethereum mainnet config // ethereum mainnet config
chainContext := core.NewChainContext() chainContext := core.NewChainContext()