Add relayer version metric + dashboard. #1209
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: relayer-ci | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
ci: | |
strategy: | |
fail-fast: false | |
matrix: | |
ci_step: [ | |
"lint", | |
"test", | |
"fuzz-test", | |
"integration tests contract", | |
"integration tests processes", | |
"integration tests xrpl", | |
] | |
include: | |
- ci_step: "lint" | |
command: "make lint-go" | |
linter-cache: true | |
docker-cache: false | |
build-contract: false | |
- ci_step: "test" | |
command: "make test-relayer" | |
linter-cache: false | |
docker-cache: false | |
build-contract: false | |
- ci_step: "fuzz-test" | |
command: "make test-fuzz" | |
linter-cache: false | |
docker-cache: false | |
build-contract: false | |
- ci_step: "integration tests contract" | |
command: "make restart-dev-env && make test-single-integration TESTS_DIR=integration-tests/contract" | |
linter-cache: false | |
docker-cache: true | |
build-contract: true | |
- ci_step: "integration tests processes" | |
command: "make restart-dev-env && make test-single-integration TESTS_DIR=integration-tests/processes" | |
linter-cache: false | |
docker-cache: true | |
build-contract: true | |
- ci_step: "integration tests xrpl" | |
command: "make restart-dev-env && make test-single-integration TESTS_DIR=integration-tests/xrpl" | |
linter-cache: false | |
docker-cache: true | |
build-contract: true | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Go version used to build crust tool | |
run: go version | |
- name: Checkout coreumbridge-xrpl | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
path: coreumbridge-xrpl | |
- name: Checkout crust | |
uses: actions/checkout@v4 | |
with: | |
repository: CoreumFoundation/crust | |
path: crust | |
ref: 9e29fa9e7f52a0e8db70c1a1d43404de432bdac3 | |
- name: Checkout coreum | |
uses: actions/checkout@v4 | |
with: | |
repository: CoreumFoundation/coreum | |
path: coreum | |
ref: 4695973601fb222a90677c645e975f6a264238b6 | |
- name: Get crust-coreum cache key | |
id: crust-coreum-cache-key | |
run: | | |
cd ${{ github.workspace }}/crust | |
CRUST_HASH=$(git rev-parse HEAD) | |
cd ${{ github.workspace }}/coreum | |
COREM_HASH=$(git rev-parse HEAD) | |
echo "key=$CRUST_HASH-$COREM_HASH" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Set up crust binaries | |
run: echo "$(pwd)/crust/bin" >> $GITHUB_PATH | |
- name: Set up crust cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/crust/ | |
${{ github.workspace }}/crust/bin/.cache | |
key: ${{ runner.os }}-crust-cache-${{ steps.crust-coreum-cache-key.outputs.key }} | |
- name: Set up coreum binaries | |
run: echo "$(pwd)/coreum/bin" >> $GITHUB_PATH | |
- name: Set up go cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-cache-${{ hashFiles('**/go.sum') }} | |
- name: Set up linter cache | |
uses: actions/cache@v4 | |
if: ${{ matrix.linter-cache }} | |
with: | |
path: ~/.cache/golangci-lint | |
key: ${{ runner.os }}-linter-cache | |
- name: Set up wasm cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ github.workspace }}/coreumbridge-xrpl/contract/target/ | |
key: ${{ runner.os }}-wasm-cache-${{ hashFiles('**/Cargo.lock') }} | |
if: ${{ matrix.build-contract }} | |
- name: Set up docker cache | |
uses: satackey/action-docker-layer-caching@v0.0.11 | |
if: ${{ matrix.docker-cache }} | |
continue-on-error: true | |
with: | |
key: ${{ runner.os }}-docker-cache-${{ steps.crust-coreum-cache-key.outputs.key }} | |
- name: Build contract | |
run: make build-contract | |
working-directory: ./coreumbridge-xrpl | |
if: ${{ matrix.build-contract }} | |
- name: Download released wasm contract | |
run: make download-released-contract | |
if: ${{ matrix.build-contract }} | |
working-directory: ./coreumbridge-xrpl | |
- name: Build dev environment | |
run: make build-dev-env | |
working-directory: ./coreumbridge-xrpl | |
- name: Run ${{ matrix.ci_step }} | |
working-directory: ./coreumbridge-xrpl | |
run: ${{ matrix.command }} | |
- name: Dump docker logs on failure | |
if: failure() | |
uses: jwalton/gh-docker-logs@v2 |