-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
* (feat) Added configuration for pre-commit. Solved all issues found by pre-commit stepts, including golangci-lint * (feat) Added GitHub workflow to run pre-commit for PRs and when pushing to master and dev * (fix) Fix pre-commit configuration * (fix) Fix pre-commit configuration * (feat) Added GitHub workflow to run tests and calculate coverage * (feat) Added Codecov badge in README.md * (feat) Added configuration for pre-commit. Solved all issues found by pre-commit stepts, including golangci-lint * (feat) Added GitHub workflow to run pre-commit for PRs and when pushing to master and dev * (fix) Fix pre-commit configuration * (fix) Fix pre-commit configuration * (feat) Added GitHub workflow to run tests and calculate coverage * (feat) Added Codecov badge in README.md * (fix) Fixed incorrect numbers in example script module names --------- Co-authored-by: abel <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: pre-commit | ||
on: | ||
pull_request: | ||
push: | ||
branches: [master, dev] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
- run: go install golang.org/x/tools/cmd/goimports@latest | ||
- run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s - -b $(go env GOPATH)/bin v1.49.0 | ||
- run: echo "PATH=$PATH:/home/runner/go/bin" >> $GITHUB_ENV | ||
- uses: actions/checkout@v3 | ||
- uses: pre-commit/[email protected] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: run-tests | ||
on: | ||
pull_request: | ||
push: | ||
branches: [ master, dev ] | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
- name: Run test and calculate coverage | ||
run: make coverage | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.idea/ | ||
.chain_cookie | ||
.exchange_cookie | ||
coverage.out |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
exclude: | | ||
(?x)^( | ||
proto/.*| | ||
exchange/.* | ||
)$ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- repo: https://github.com/dnephin/pre-commit-golang | ||
rev: v0.5.0 | ||
hooks: | ||
- id: go-fmt | ||
- id: go-imports | ||
- id: golangci-lint | ||
args: [--timeout=15m] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.