Integrate IBC hooks #4697
Workflow file for this run
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
name: ci | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: '0 1 * * 1' # At 01:00 on Monday | |
workflow_dispatch: | |
jobs: | |
ci: | |
strategy: | |
fail-fast: false | |
matrix: | |
ci_step: [ | |
"lint", | |
"test", | |
"integration tests coreum-modules", | |
"integration tests coreum-ibc", | |
"integration tests coreum-upgrade-v4.0.0", | |
"integration tests faucet", | |
] | |
include: | |
- ci_step: "lint" | |
command: "coreum-builder lint" | |
linter-cache: true | |
codecov: false | |
- ci_step: "test" | |
command: "coreum-builder test" | |
linter-cache: false | |
codecov: true | |
codecov-name: coreum | |
- ci_step: "integration tests coreum-modules" | |
command: | | |
coreum-builder build images | |
crust znet start --profiles=3cored --timeout-commit 0.5s | |
coreum-builder integration-tests-unsafe/modules | |
crust znet stop | |
crust znet coverage-convert | |
linter-cache: false | |
codecov: true | |
codecov-name: coreum-integration-tests-modules | |
- ci_step: "integration tests coreum-ibc" | |
command: | | |
coreum-builder build images | |
crust znet start --profiles=3cored,ibc --timeout-commit 1s | |
coreum-builder integration-tests-unsafe/ibc | |
linter-cache: false | |
codecov: false | |
- ci_step: "integration tests coreum-upgrade-v4.0.0" | |
command: | | |
coreum-builder build images | |
crust znet start --cored-version=v3.0.3 --profiles=3cored,ibc --timeout-commit 1s | |
coreum-builder integration-tests-unsafe/upgrade integration-tests-unsafe/ibc integration-tests-unsafe/modules | |
linter-cache: false | |
codecov: false | |
- ci_step: "integration tests faucet" | |
command: | | |
coreum-builder build images | |
faucet-builder images | |
crust znet start --profiles=faucet --timeout-commit 0.5s | |
faucet-builder integration-tests | |
linter-cache: false | |
codecov: false | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Go version used to build builder | |
run: go version | |
- name: Checkout coreum | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
path: coreum | |
- name: Checkout faucet | |
uses: actions/checkout@v4 | |
with: | |
repository: CoreumFoundation/faucet | |
path: faucet | |
- name: Checkout crust | |
uses: actions/checkout@v4 | |
with: | |
repository: CoreumFoundation/crust | |
path: crust | |
- name: Set up build system | |
run: | | |
echo "$(pwd)/coreum/bin" >> $GITHUB_PATH | |
echo "$(pwd)/faucet/bin" >> $GITHUB_PATH | |
echo "$(pwd)/crust/bin" >> $GITHUB_PATH | |
- name: Retrieve go version | |
id: goversion | |
run: echo "GO_VERSION=$(coreum/bin/go version)" >> $GITHUB_OUTPUT | |
- name: Print go version | |
run: echo ${{ steps.goversion.outputs.GO_VERSION }} | |
- name: Setup go cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-v2-${{ hashFiles('**/go.sum') }}-${{ steps.goversion.outputs.GO_VERSION }} | |
- name: Setup crust cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/crust | |
key: ${{ runner.os }}-crust-cache | |
- name: Setup linter cache | |
uses: actions/cache@v4 | |
if: ${{ matrix.linter-cache }} | |
with: | |
path: ~/.cache/golangci-lint | |
key: ${{ runner.os }}-linter-cache-2-${{ steps.goversion.outputs.GO_VERSION }} | |
- name: Get Date | |
id: get-year-week | |
run: | | |
echo "date=$(/bin/date -u "+%Y-%U")" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Set docker cache | |
uses: satackey/[email protected] | |
continue-on-error: true | |
with: | |
key: ${{ runner.os }}-docker-${{ steps.get-year-week.outputs.date }} # year-week key | |
- name: Prepare dependencies | |
# FIXME (wojciech): Execute `download` commands for crust builder once available | |
run: | | |
crust build/me | |
crust build | |
crust znet remove | |
coreum-builder build/me | |
coreum-builder download | |
faucet-builder build/me | |
faucet-builder download | |
- name: Run ${{ matrix.ci_step }} | |
run: ${{ matrix.command }} | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ${{ github.workspace }}/coreum/coverage/${{ matrix.codecov-name }} | |
flags: ${{ matrix.codecov-name }} | |
fail_ci_if_error: true | |
verbose: true | |
if: ${{ matrix.codecov }} | |
- name: Dump docker logs on failure | |
if: failure() | |
uses: jwalton/gh-docker-logs@v2 |