Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: intermittent test failures #1195

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 21 additions & 124 deletions .github/workflows/buildtest.yaml
Original file line number Diff line number Diff line change
@@ -1,131 +1,28 @@
# This is a basic workflow that is manually triggered
name: build and test

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
pull_request:
branches:
- main
- develop
- unstable
- unstable-v1.5
paths-ignore:
- 'quicksilverjs/**'
- 'webui/**'
workflow_dispatch:
push:
branches:
- main
- develop
- unstable
- unstable-v1.5
paths-ignore:
- 'quicksilverjs/**'
- 'webui/**'


# This workflow makes x86_64 for windows, and linux.

on: [push, pull_request]
name: Build and Test
jobs:
build:
strategy:
matrix:
arch: [amd64]
targetos: [linux, windows, darwin]
include:
- targetos: darwin
arch: arm64
runs-on: ubuntu-latest
name: build quicksilver
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
env:
GOOS: ${{ matrix.targetos }}
GOARCH: ${{ matrix.arch }}


- name: Compile quicksilver
run: |
make install

- name: Archive quicksilver binaries
if: github.ref == 'refs/heads/develop'
uses: actions/upload-artifact@v4
with:
name: quicksilverd-${{ matrix.targetos }}-${{ matrix.arch }}
path: |
~/go/bin/quicksilverd*

test:
runs-on: ubuntu-latest
name: test quicksilver
strategy:
matrix:
arch: [amd64]
targetos: [linux, windows]
include:
- targetos: darwin
arch: arm64
go-version: [1.22.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
env:
GOOS: ${{ matrix.targetos }}
GOARCH: ${{ matrix.arch }}


- name: test quicksilver
run: |
make test-unit-cover

- name: filter out DONTCOVER
run: |
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')"
excludelist+=" $(find ./ -type f -name '*.pb.go')"
excludelist+=" $(find ./ -type f -name '*.pb.gw.go')"
excludelist+=" $(find ./ -type f -path './test/*.go')"
excludelist+=" $(find ./ -type f -path './third-party-chains/*.go')"
for filename in ${excludelist}; do
filename=$(echo $filename | sed 's/^./github.com\/quicksilver-zone\/quicksilver/g')
echo "Excluding ${filename} from coverage report..."
sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt
done

- name: "Go vulnerability checks"
continue-on-error: true
run: make vulncheck

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # needed for private repo
files: ./coverage.txt
flags: unittests
fail_ci_if_error: true
verbose: true

simulate:
if: contains(github.event.pull_request.labels.*.name, 'run-sim')
runs-on: ubuntu-latest
name: simulate quicksilver
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v5
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- run: go test ./...
build:
strategy:
matrix:
go-version: [1.22.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Run simulation tests
run: make test-sim-ci
go-version: ${{ matrix.go-version }}
- run: go build ./...
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.7
go-version: "1.22"
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- name: Setup Golang caches
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/icq-relayer-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.21.x]
go-version: [1.22.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -19,7 +19,7 @@ jobs:
build:
strategy:
matrix:
go-version: [1.21.x]
go-version: [1.22.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/interchaintest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- name: Setup Golang caches
uses: actions/cache@v4
Expand All @@ -58,7 +58,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
id: go

- name: checkout chain
Expand All @@ -75,7 +75,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
id: go

- name: checkout chain
Expand All @@ -92,7 +92,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
id: go

- name: checkout chain
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/simulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
${{ runner.os }}-go-
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- name: Run simulation tests
run: make test-sim-non-determinism
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/quicksilver-zone/quicksilver

go 1.21
go 1.22

require (
cosmossdk.io/errors v1.0.1
Expand Down
Loading