-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from KendrickAng/main
merging upstream
- Loading branch information
Showing
159 changed files
with
46,799 additions
and
36,260 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,47 @@ | ||
on: [push, pull_request] | ||
name: every commit | ||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
name: build | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.0 | ||
- run: go build ./... | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
name: test | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.0 | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Test | ||
run: go test ./... | ||
|
||
# Use --check or --exit-code when available (Go 1.19?) | ||
# https://github.com/golang/go/issues/27005 | ||
tidy: | ||
runs-on: ubuntu-latest | ||
name: tidy | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.0 | ||
- run: | | ||
go mod tidy | ||
CHANGES_IN_REPO=$(git status --porcelain) | ||
if [[ -n "$CHANGES_IN_REPO" ]]; then | ||
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:" | ||
git status && git --no-pager diff | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.
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,27 @@ | ||
name: Run Gosec | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
GO111MODULE: on | ||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v3 | ||
- uses: technote-space/get-diff-action@v3 | ||
with: | ||
SUFFIX_FILTER: | | ||
.go | ||
.mod | ||
.sum | ||
- name: Run Gosec Security Scanner | ||
uses: informalsystems/gosec@master | ||
with: | ||
args: ./... | ||
if: "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Lint | ||
# Lint runs golangci-lint over the entire Gaia repository | ||
# This workflow is run on every pull request and push to main | ||
# The `golangci` job will pass without running if no *.{go, mod, sum} files have been modified. | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
golangci: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.0 | ||
- uses: actions/checkout@v3 | ||
- uses: technote-space/get-diff-action@v4 | ||
with: | ||
PATTERNS: | | ||
**/**.go | ||
go.mod | ||
go.sum | ||
- uses: golangci/golangci-lint-action@v3 | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.51.2 | ||
args: --timeout 10m | ||
github-token: ${{ secrets.github_token }} | ||
if: "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Simulation Test | ||
|
||
on: | ||
# Triggers the workflow on pull request events but only for the 'main' branch | ||
pull_request: | ||
branches: ["main"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
simulation-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Download Modules | ||
run: go mod download | ||
|
||
- name: Test | ||
id: test | ||
run: go test -v -run=TestFullAppSimulation ./app -NumBlocks 200 -BlockSize 50 -Commit -Enabled -Period 1 |
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,47 @@ | ||
# name: Test Coverage | ||
# on: | ||
# pull_request: | ||
# push: | ||
# branches: | ||
# - main | ||
# jobs: | ||
# cleanup-runs: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: rokroskar/workflow-run-cleanup-action@master | ||
# env: | ||
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
# if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" | ||
# | ||
# test-coverage-upload: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/setup-go@v4 | ||
# with: | ||
# go-version: 1.20.0 | ||
# - uses: actions/checkout@v3 | ||
# - uses: technote-space/get-diff-action@v4 | ||
# with: | ||
# PATTERNS: | | ||
# **/**.go | ||
# go.mod | ||
# go.sum | ||
# - 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 != ''" | ||
# - 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\/terra-money\/core\/v2/g') | ||
# echo "Excluding ${filename} from coverage report..." | ||
# sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt | ||
# done | ||
# if: "env.GIT_DIFF != ''" | ||
# - uses: codecov/codecov-action@v1 | ||
# with: | ||
# file: ./coverage.txt # optional | ||
# fail_ci_if_error: true | ||
# if: "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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,8 @@ release/ | |
.DS_Store | ||
dist | ||
build | ||
|
||
vendor/ | ||
tmp-swagger-gen/ | ||
.test-data/ | ||
coverage.txt | ||
target/ |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.