mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ libevm ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ libevm ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
go_test_short:
|
||||||
runs-on: self-hosted
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
|
|
@ -17,7 +17,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: 1.21.4
|
go-version: 1.21.4
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: go test -short ./...
|
run: go test -short $(go list ./... | grep -Pv 'go-ethereum/(accounts/keystore|eth/downloader|miner)$')
|
||||||
env:
|
|
||||||
GOOS: linux
|
|
||||||
GOARCH: 386
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,8 @@ func (*Extras[C, R]) getter() (g ExtraPayloadGetter[C, R]) { return }
|
||||||
|
|
||||||
// mustBeStruct panics if `T` isn't a struct.
|
// mustBeStruct panics if `T` isn't a struct.
|
||||||
func mustBeStruct[T any]() {
|
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]())
|
panic(notStructMessage[T]())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue