mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 13:44:31 +00:00
chore: basic CI (#9)
* chore: Go CI runs on `libevm` branch * fix: stop using `reflect.TypeFor[T]()` * chore: rename job, remove flaky tests, and clear `GOOS`+`GOARCH` * fix: PR branch was `libem` * chore: rename workflow * chore: disable flaky `accounts/keystore` test
This commit is contained in:
parent
5429fd87c8
commit
b6f3eb9093
2 changed files with 8 additions and 10 deletions
15
.github/workflows/go.yml
vendored
15
.github/workflows/go.yml
vendored
|
|
@ -1,15 +1,15 @@
|
|||
name: i386 linux tests
|
||||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [ libevm ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches: [ libevm ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
go_test_short:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Go
|
||||
|
|
@ -17,7 +17,4 @@ jobs:
|
|||
with:
|
||||
go-version: 1.21.4
|
||||
- name: Run tests
|
||||
run: go test -short ./...
|
||||
env:
|
||||
GOOS: linux
|
||||
GOARCH: 386
|
||||
run: go test -short $(go list ./... | grep -Pv 'go-ethereum/(accounts/keystore|eth/downloader|miner)$')
|
||||
|
|
|
|||
|
|
@ -108,7 +108,8 @@ func (*Extras[C, R]) getter() (g ExtraPayloadGetter[C, R]) { return }
|
|||
|
||||
// mustBeStruct panics if `T` isn't a struct.
|
||||
func mustBeStruct[T any]() {
|
||||
if k := reflect.TypeFor[T]().Kind(); k != reflect.Struct {
|
||||
var x T
|
||||
if k := reflect.TypeOf(x).Kind(); k != reflect.Struct {
|
||||
panic(notStructMessage[T]())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue