-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e5bf18
commit 1674090
Showing
21 changed files
with
28,891 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
### Purpose or design rationale of this PR | ||
|
||
*Describe your change. Make sure to answer these three questions: What does this PR do? Why does it do it? How does it do it?* | ||
|
||
|
||
### PR title | ||
|
||
Your PR title must follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) (as we are doing squash merge for each PR), so it must start with one of the following [types](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#type): | ||
|
||
- [ ] build: Changes that affect the build system or external dependencies (example scopes: yarn, eslint, typescript) | ||
- [ ] ci: Changes to our CI configuration files and scripts (example scopes: vercel, github, cypress) | ||
- [ ] docs: Documentation-only changes | ||
- [ ] feat: A new feature | ||
- [ ] fix: A bug fix | ||
- [ ] perf: A code change that improves performance | ||
- [ ] refactor: A code change that doesn't fix a bug, or add a feature, or improves performance | ||
- [ ] style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | ||
- [ ] test: Adding missing tests or correcting existing tests | ||
|
||
|
||
### Breaking change label | ||
|
||
Does this PR have the `breaking-change` label? | ||
|
||
- [ ] No, this PR is not a breaking change | ||
- [ ] Yes |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: codec | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
jobs: | ||
check: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.20.x | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Lint | ||
run: | | ||
rm -rf $HOME/.cache/golangci-lint | ||
make lint | ||
goimports-lint: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.20.x | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install goimports | ||
run: go install golang.org/x/tools/cmd/goimports@latest | ||
- run: goimports -local github.com/scroll-tech/da-codec/encoding/ -w . | ||
- run: go mod tidy | ||
# If there are any diffs from goimports or go mod tidy, fail. | ||
- name: Verify no changes from goimports and go mod tidy | ||
run: | | ||
if [ -n "$(git status --porcelain)" ]; then | ||
exit 1 | ||
fi | ||
tests: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.20.x | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Test codec packages | ||
working-directory: '.' | ||
run: | | ||
make test |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.PHONY: fmt lint test | ||
|
||
lint: | ||
GOBIN=$(PWD)/build/bin go run ./build/lint.go | ||
|
||
fmt: | ||
go mod tidy | ||
goimports -w . | ||
gofumpt -l -w . | ||
|
||
test: | ||
go test -v -race -gcflags="-l" -ldflags="-s=false" -coverprofile=coverage.txt -covermode=atomic ./... |
Oops, something went wrong.