chore: remove norace tag (#12738)
## Description remove norace tag and deduplicate tests running twice once approved I will remove the required statements for test-race --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
This commit is contained in:
parent
9c51d9ac98
commit
f7db013dc2
51
.github/workflows/e2e.yml
vendored
Normal file
51
.github/workflows/e2e.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
name: Tests E2E
|
||||
# Tests Race workflow runs unit tests with the race detector
|
||||
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- uses: technote-space/get-diff-action@v6.1.0
|
||||
id: git_diff
|
||||
with:
|
||||
PATTERNS: |
|
||||
**/**.go
|
||||
**/go.mod
|
||||
**/go.sum
|
||||
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
|
||||
- name: Build
|
||||
if: env.GIT_DIFF
|
||||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build
|
||||
|
||||
|
||||
test-e2e:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- uses: technote-space/get-diff-action@v6.1.0
|
||||
with:
|
||||
PATTERNS: |
|
||||
**/**.go
|
||||
go.mod
|
||||
go.sum
|
||||
- name: e2e tests
|
||||
if: env.GIT_DIFF
|
||||
run: |
|
||||
cd tests/e2e && go test ./... -mod=readonly -timeout 30m -race -tags='e2e'
|
||||
138
.github/workflows/test-race.yml
vendored
138
.github/workflows/test-race.yml
vendored
@ -1,138 +0,0 @@
|
||||
name: Tests Race
|
||||
# Tests Race workflow runs unit tests with the race detector
|
||||
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
cleanup-runs:
|
||||
runs-on: buildjet-4vcpu-ubuntu-2004
|
||||
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'"
|
||||
|
||||
install-tparse:
|
||||
runs-on: buildjet-4vcpu-ubuntu-2004
|
||||
steps:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Display go version
|
||||
run: go version
|
||||
- name: install tparse
|
||||
run: go install github.com/mfridman/tparse@v0.8.3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/go/bin
|
||||
key: ${{ runner.os }}-go-tparse-binary
|
||||
|
||||
build:
|
||||
runs-on: buildjet-4vcpu-ubuntu-2004
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- uses: technote-space/get-diff-action@v6.1.0
|
||||
id: git_diff
|
||||
with:
|
||||
PATTERNS: |
|
||||
**/**.go
|
||||
**/go.mod
|
||||
**/go.sum
|
||||
- name: Get data from Go build cache
|
||||
uses: actions/cache@v3
|
||||
# if: env.GIT_DIFF
|
||||
if: ${{ false }}
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/golangci-lint
|
||||
~/.cache/go-build
|
||||
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
|
||||
- name: Build
|
||||
if: env.GIT_DIFF
|
||||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build
|
||||
|
||||
- name: Build cosmovisor
|
||||
if: env.GIT_DIFF
|
||||
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make cosmovisor
|
||||
|
||||
split-test-files:
|
||||
runs-on: buildjet-4vcpu-ubuntu-2004
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Create a file with all core Cosmos SDK pkgs
|
||||
run: go list ./... > pkgs.txt
|
||||
- name: Split pkgs into 4 files
|
||||
run: split -d -n l/4 pkgs.txt pkgs.txt.part.
|
||||
# cache multiple
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "${{ github.sha }}-00"
|
||||
path: ./pkgs.txt.part.00
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "${{ github.sha }}-01"
|
||||
path: ./pkgs.txt.part.01
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "${{ github.sha }}-02"
|
||||
path: ./pkgs.txt.part.02
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "${{ github.sha }}-03"
|
||||
path: ./pkgs.txt.part.03
|
||||
|
||||
test-race:
|
||||
runs-on: buildjet-4vcpu-ubuntu-2004
|
||||
needs: split-test-files
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
part: ["00", "01", "02", "03"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- uses: technote-space/get-diff-action@v6.1.0
|
||||
with:
|
||||
PATTERNS: |
|
||||
**/**.go
|
||||
go.mod
|
||||
go.sum
|
||||
- name: Get data from Go build cache
|
||||
uses: actions/cache@v3
|
||||
# if: env.GIT_DIFF
|
||||
if: ${{ false }}
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/golangci-lint
|
||||
~/.cache/go-build
|
||||
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
|
||||
- uses: actions/download-artifact@v3
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-${{ matrix.part }}"
|
||||
- name: test & coverage report creation
|
||||
if: env.GIT_DIFF
|
||||
run: |
|
||||
xargs --arg-file=pkgs.txt.part.${{ matrix.part }} go test -mod=readonly -timeout 30m -race -tags='cgo ledger test_ledger_mock'
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-${{ matrix.part }}-race-output"
|
||||
path: ./${{ matrix.part }}-race-output.txt
|
||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -157,7 +157,7 @@ jobs:
|
||||
if: env.GIT_DIFF
|
||||
- name: test & coverage report creation
|
||||
run: |
|
||||
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='norace ledger test_ledger_mock'
|
||||
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -race -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='ledger test_ledger_mock'
|
||||
if: env.GIT_DIFF
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
|
||||
package rpc_test
|
||||
|
||||
import (
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
|
||||
package grpc_test
|
||||
|
||||
import (
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
|
||||
package simapp_test
|
||||
|
||||
import (
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package tmservice_test
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testsuite
|
||||
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
import (
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
import (
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package server_test
|
||||
|
||||
import (
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//go:build norace
|
||||
// +build norace
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
//go:build e2e
|
||||
// +build e2e
|
||||
|
||||
package testutil
|
||||
|
||||
import (
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
// build +norace
|
||||
|
||||
package tx_test
|
||||
|
||||
import (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user