Skip to content

Test cosmos-sdk

Test cosmos-sdk #652

Workflow file for this run

name: Test cosmos-sdk
on:
schedule:
- cron: "0 3 * * *"
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}-tests
cancel-in-progress: true
jobs:
split-test-files:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.22
- uses: actions/checkout@v3
- name: Create a file with all core Cosmos SDK pkgs
run: |
go mod download
COSMOSSDK_DIR=$(go list -m -f '{{.Dir}}' github.com/cosmos/cosmos-sdk)
echo "Cosmos SDK Path: $COSMOSSDK_DIR"
go list $COSMOSSDK_DIR/... > pkgs.txt
- name: Split pkgs into 4 files
run: split -d -n l/4 pkgs.txt pkgs.txt.part.
- 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
tests:
runs-on: ubuntu-latest
needs: split-test-files
strategy:
fail-fast: false
matrix:
part: ["00", "01", "02", "03"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.22
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/*.go
go.mod
go.sum
**/go.mod
**/go.sum
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}"
- name: test
if: env.GIT_DIFF
run: |
./scripts/test/run-test-unit-cosmos.sh pkgs.txt.part.${{ matrix.part }}
test-sim-nondeterminism:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.22
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/*.go
go.mod
go.sum
**/go.mod
**/go.sum
**/Makefile
Makefile
- name: test-sim-nondeterminism
if: env.GIT_DIFF
run: |
go test github.com/cosmos/cosmos-sdk/testutil/sims -run TestAppStateDeterminism -Enabled=true -NumBlocks=100 -BlockSize=200 -Commit=true -Period=0 -v -timeout 24h
# refactor: run integration tests when we upgrade cosmos-sdk to 0.46+
# test-integration:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v3
# with:
# go-version: 1.18
# - uses: technote-space/[email protected]
# id: git_diff
# with:
# PATTERNS: |
# **/*.go
# go.mod
# go.sum
# **/go.mod
# **/go.sum
# **/Makefile
# Makefile
# - name: integration tests
# if: env.GIT_DIFF
# run: |
# go test -mod=readonly github.com/cosmos/cosmos-sdk/integration/... -timeout 30m
# refactor: run e2e tests when we upgrade cosmos-sdk to 0.46+
# test-e2e:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v3
# with:
# go-version: 1.18
# - uses: technote-space/[email protected]
# id: git_diff
# with:
# PATTERNS: |
# **/*.go
# go.mod
# go.sum
# **/go.mod
# **/go.sum
# **/Makefile
# Makefile
# - name: e2e tests
# if: env.GIT_DIFF
# run: |
# go test github.com/cosmos/cosmos-sdk/e2e/... -mod=readonly -timeout 30m -race -tags='e2e'