Skip to content

Commit

Permalink
Merge branch 'main' into reece/enable-all-stargate-queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups authored Aug 28, 2023
2 parents be37df0 + 1ec8af2 commit 4c929f4
Show file tree
Hide file tree
Showing 99 changed files with 4,682 additions and 493 deletions.
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
build/
build/
.github/
interchaintest/
*.md
15 changes: 9 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,29 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GO_VERSION: 1.20.7

jobs:
build:
runs-on: ubuntu-latest
name: build
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.20.0
go-version: ${{ env.GO_VERSION }}
- run: go build ./...

test:
runs-on: ubuntu-latest
name: test
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.20.0
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v3
- name: Test
Expand All @@ -42,9 +45,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.20.0
go-version: ${{ env.GO_VERSION }}
- run: |
go mod tidy
CHANGES_IN_REPO=$(git status --porcelain)
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GO_VERSION: 1.20.7

jobs:
analyze:
name: Analyze
Expand All @@ -29,9 +32,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: 1.20.0
go-version: ${{ env.GO_VERSION }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GO_VERSION: 1.20.7

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: 1.20.0
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3

- name: golangci-lint-junod
Expand Down
173 changes: 57 additions & 116 deletions .github/workflows/interchaintest-E2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,152 +4,93 @@ on:
pull_request:
push:
tags:
- '**'
- "**"
branches:
- 'main'
- 'master'
- "main"
- "master"

permissions:
contents: read
packages: write

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-e2e
GO_VERSION: 1.19
GO_VERSION: 1.20.7
TAR_PATH: /tmp/juno-docker-image.tar
IMAGE_NAME: juno-docker-image

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-push-image:
build-docker:
runs-on: ubuntu-latest
outputs:
branchTag: ${{ steps.meta.outputs.version }}
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
- name: Checkout
uses: actions/checkout@v3

# We setup go & cache dependencies here. This way each child job
# does not have to reinstall all dependencies individually.
# Should ID be unique to this job only?
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v4
- name: Setup Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
id: go

- name: Download dependencies
run: |
go mod download
cd interchaintest && go mod download
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
cache-dependency-path: interchaintest/go.sum

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
id: push
- name: Build and export
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

# make juno:branchname here for all needs.build-and-push-image.outputs.branchTag
# then upload to github. Then download for each as a cache. This way its only built once

test-juno-basic:
needs: build-and-push-image
uses: ./.github/workflows/make-cmd-runner.yml
with:
make-command: ictest-basic
branch-tag: ${{needs.build-and-push-image.outputs.branchTag}}

test-juno-ibc:
needs: build-and-push-image
uses: ./.github/workflows/make-cmd-runner.yml
with:
make-command: ictest-ibc
branch-tag: ${{needs.build-and-push-image.outputs.branchTag}}
tags: juno:local
outputs: type=docker,dest=${{ env.TAR_PATH }}

test-juno-upgrade:
needs: build-and-push-image
uses: ./.github/workflows/make-cmd-runner.yml
with:
make-command: ictest-upgrade
branch-tag: ${{needs.build-and-push-image.outputs.branchTag}}

test-juno-tokenfactory:
needs: build-and-push-image
uses: ./.github/workflows/make-cmd-runner.yml
with:
make-command: ictest-tokenfactory
branch-tag: ${{needs.build-and-push-image.outputs.branchTag}}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.IMAGE_NAME }}
path: ${{ env.TAR_PATH }}

test-juno-feeshare:
needs: build-and-push-image
uses: ./.github/workflows/make-cmd-runner.yml
with:
make-command: ictest-feeshare
branch-tag: ${{needs.build-and-push-image.outputs.branchTag}}
e2e-tests:
needs: build-docker
runs-on: ubuntu-latest
strategy:
matrix:
# names of `make` commands to run tests
test:
- "ictest-basic"
- "ictest-ibchooks"
- "ictest-tokenfactory"
- "ictest-feeshare"
- "ictest-pfm"
- "ictest-upgrade"
- "ictest-ibc"
- "ictest-unity-deploy"
- "ictest-unity-gov"
- "ictest-pob"
- "ictest-drip"
fail-fast: false

test-juno-ibchooks:
needs: build-and-push-image
uses: ./.github/workflows/make-cmd-runner.yml
with:
make-command: ictest-ibchooks
branch-tag: ${{needs.build-and-push-image.outputs.branchTag}}
steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: interchaintest/go.sum

# === UNITY CONTRACT ===
test-juno-unity-deploy:
needs: build-and-push-image
uses: ./.github/workflows/make-cmd-runner.yml
with:
make-command: ictest-unity-deploy
branch-tag: ${{needs.build-and-push-image.outputs.branchTag}}
- name: checkout chain
uses: actions/checkout@v3

test-juno-unity-gov:
needs: build-and-push-image
uses: ./.github/workflows/make-cmd-runner.yml
with:
make-command: ictest-unity-gov
branch-tag: ${{needs.build-and-push-image.outputs.branchTag}}
- name: Download Tarball Artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.IMAGE_NAME }}
path: /tmp

test-juno-pfm:
needs: build-and-push-image
uses: ./.github/workflows/make-cmd-runner.yml
with:
make-command: ictest-pfm
branch-tag: ${{needs.build-and-push-image.outputs.branchTag}}
- name: Load Docker Image
run: |
docker image load -i ${{ env.TAR_PATH }}
docker image ls -a
test-pob:
needs: build-and-push-image
uses: ./.github/workflows/make-cmd-runner.yml
with:
make-command: ictest-pob
branch-tag: ${{needs.build-and-push-image.outputs.branchTag}}
- name: Run Test
run: make ${{ matrix.test }}
31 changes: 0 additions & 31 deletions .github/workflows/make-cmd-runner.yml

This file was deleted.

3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ ictest-unity-gov: rm-testcache
ictest-pob: rm-testcache
cd interchaintest && go test -race -v -run TestJunoPOB .

ictest-drip: rm-testcache
cd interchaintest && go test -race -v -run TestJunoDrip .

rm-testcache:
go clean -testcache

Expand Down
Loading

0 comments on commit 4c929f4

Please sign in to comment.