feat: blocks package
#63
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Go | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| # If adding a new job, add it to the `needs` list of the `go` job as this is | |
| # what gates PRs. | |
| go: | |
| runs-on: ubuntu-latest | |
| needs: [go_test, go_generate, go_tidy] | |
| steps: | |
| - run: echo "Dependencies successful" | |
| go_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "go.mod" | |
| - run: go test ./... | |
| go_generate: | |
| env: | |
| EXCLUDE_REGEX: "ava-labs/libevm/(accounts/usbwallet/trezor)$" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Run `go generate` | |
| run: go list ./... | grep -Pv "${EXCLUDE_REGEX}" | xargs go generate; | |
| - name: git diff | |
| run: git diff --exit-code | |
| go_tidy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "go.mod" | |
| - run: go mod tidy | |
| - run: git diff --exit-code |