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:
Arran Schlosberg 2024-09-10 20:52:25 +01:00 committed by GitHub
parent 5429fd87c8
commit b6f3eb9093
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 10 deletions

View file

@ -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)$')

View file

@ -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]())
}
}