Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utilities #11

Merged
merged 5 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
22 changes: 22 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Closes #<issue number>.

### What does this PR do?

<!-- Describe your changes here- ideally you can get that description straight from
your descriptive commit message(s)! -->

### Reviewers

Main reviewers:

<!-- Main reviewers should do a full review. There should be 2 main reviewers, unless there is a good reason for not to do it -->

- @-John
- @-Doe

Codeowner reviewers:

<!-- Codeowners should review only the part of code that they own, they're added automatically as reviewers and it's good to let them know that they shouldn't do a full review -->

- @-Alice
- @-Bob
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Test
on:
push:
branches:
- main
pull_request:

jobs:
test:
strategy:
matrix:
go-version: [ 1.19.x ]
goarch: [ "amd64" ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
env:
GOARCH: ${{ matrix.goarch }}

- name: Test
run: make test
working-directory: ./
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ run-server: ## Runs the data streamer server
run-tool: ## Runs the tool to populate the binary file
go run tool/main.go run -cfg tool/config/tool.config.toml

.PHONY: test
test:
go test -count=1 -short -race -p 1 -timeout 60s ./...

## Help display.
## Pulls comments from beside commands and prints a nicely formatted
## display with the commands and their usage information.
Expand Down
1 change: 0 additions & 1 deletion datastreamer/entities.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
type EntityDefinition struct {
Name string
StreamType StreamType
EntryType EntryType
Definition reflect.Type
}

Expand Down
6 changes: 2 additions & 4 deletions tool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ func start(cliCtx *cli.Context) error {

// Set entities definition
entriesDefinition := map[datastreamer.EntryType]datastreamer.EntityDefinition{
datastreamer.EtStartL2Block: {
db.EntryTypeL2Block: {
Name: "L2Block",
StreamType: db.StreamTypeSequencer,
EntryType: db.EntryTypeL2Block,
Definition: reflect.TypeOf(db.L2Block{}),
},
datastreamer.EtExecuteL2Tx: {
db.EntryTypeL2Tx: {
Name: "L2Transaction",
StreamType: db.StreamTypeSequencer,
EntryType: db.EntryTypeL2Tx,
Definition: reflect.TypeOf(db.L2Transaction{}),
},
}
Expand Down