-
Notifications
You must be signed in to change notification settings - Fork 16
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
Showing
25 changed files
with
131 additions
and
131 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 |
---|---|---|
|
@@ -23,9 +23,6 @@ concurrency: | |
jobs: | ||
golangci: | ||
env: | ||
# for private repo access | ||
GOPRIVATE: github.com/initia-labs | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_READ_TOKEN }} | ||
GOLANGCI_LINT_VERSION: v1.59.1 | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
|
@@ -42,15 +39,15 @@ jobs: | |
**/**.go | ||
go.mod | ||
go.sum | ||
# for private repo access | ||
- run: git config --global url.https://${GITHUB_ACCESS_TOKEN}:[email protected]/.insteadOf https://github.com/ | ||
# install golangci-lint | ||
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} | ||
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@${{ env.GOLANGCI_LINT_VERSION }} | ||
- name: run go linters (long) | ||
if: env.GIT_DIFF | ||
id: lint_long | ||
run: | | ||
make lint | ||
env: | ||
GIT_DIFF: ${{ env.GIT_DIFF }} | ||
- uses: technote-space/[email protected] | ||
if: steps.lint_long.outcome == 'skipped' | ||
with: | ||
|
@@ -68,10 +65,6 @@ jobs: | |
# Use --check or --exit-code when available (Go 1.19?) | ||
# https://github.com/golang/go/issues/27005 | ||
tidy: | ||
env: | ||
# for private repo access | ||
GOPRIVATE: github.com/initia-labs,github.com/skip-mev/slinky | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_READ_TOKEN }} | ||
runs-on: ubuntu-latest | ||
name: tidy | ||
steps: | ||
|
@@ -81,8 +74,6 @@ jobs: | |
with: | ||
go-version: 1.22 | ||
check-latest: true | ||
# for private repo access | ||
- run: git config --global url.https://${GITHUB_ACCESS_TOKEN}:[email protected]/.insteadOf https://github.com/ | ||
- run: | | ||
go mod tidy | ||
CHANGES_IN_REPO=$(git status --porcelain) | ||
|
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 |
---|---|---|
|
@@ -22,9 +22,6 @@ jobs: | |
test-coverage-upload: | ||
name: Run test and upload codecov | ||
env: | ||
# for private repo access | ||
GOPRIVATE: github.com/initia-labs/* | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_READ_TOKEN }} | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -40,25 +37,29 @@ jobs: | |
**/**.go | ||
go.mod | ||
go.sum | ||
# for private repo access | ||
- run: git config --global url.https://${GITHUB_ACCESS_TOKEN}:[email protected]/.insteadOf https://github.com/ | ||
- name: test & coverage report creation | ||
run: | | ||
go test ./... -mod=readonly -timeout 12m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' | ||
if: ${{ env.GIT_DIFF != '' }} | ||
env: | ||
GIT_DIFF: ${{ env.GIT_DIFF }} | ||
- name: filter out DONTCOVER | ||
run: | | ||
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')" | ||
excludelist+=" $(find ./ -type f -name '*.pb.go')" | ||
for filename in ${excludelist}; do | ||
filename=$(echo $filename | sed 's/^./github.com\/initia-labs\/initia/g') | ||
filename=$(echo $filename | sed 's/^./github.com\/initia-labs\/OPinit/g') | ||
echo "Excluding ${filename} from coverage report..." | ||
sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt | ||
done | ||
if: ${{ env.GIT_DIFF != '' }} | ||
env: | ||
GIT_DIFF: ${{ env.GIT_DIFF }} | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.txt | ||
fail_ci_if_error: true | ||
if: ${{ env.GIT_DIFF != '' }} | ||
env: | ||
GIT_DIFF: ${{ env.GIT_DIFF }} |
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
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
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
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
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
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
Oops, something went wrong.