Skip to content

Finalize docs (#22) #98

Finalize docs (#22)

Finalize docs (#22) #98

Workflow file for this run

name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
ci:
strategy:
fail-fast: false
matrix:
ci_step: [
"lint",
"test",
"integration tests",
]
include:
- ci_step: "lint"
command: "make lint"
linter-cache: true
docker-cache: false
codecov: false
- ci_step: "test"
command: "make test"
linter-cache: false
docker-cache: false
codecov: false
codecov-name: iso20022-cover.out
- ci_step: "integration tests"
command: |
coreum-builder build images
crust znet start --profiles=1cored --timeout-commit 0.5s
make integration-test
linter-cache: false
docker-cache: true
codecov: false
codecov-name: integration-cover.out
runs-on: ubuntu-22.04
steps:
- name: Go version used to build builder
run: go version
- name: Checkout iso20022-client
uses: actions/checkout@v4
with:
persist-credentials: false
path: iso20022-client
- name: Checkout crust
uses: actions/checkout@v4
with:
repository: CoreumFoundation/crust
path: crust
ref: 66e0a14ecac37fe053780b6d814231bd98eb2240
- name: Checkout coreum
uses: actions/checkout@v4
with:
repository: CoreumFoundation/coreum
path: coreum
ref: 4e06879add40dc0a64c48a87f4b293c08b88f4d9
- name: Set up build system
run: |
echo "$(pwd)/iso20022-client/bin" >> $GITHUB_PATH
echo "$(pwd)/coreum/bin" >> $GITHUB_PATH
echo "$(pwd)/crust/bin" >> $GITHUB_PATH
cd $(pwd)/iso20022-client
make build
- name: Retrieve go version
id: goversion
run: echo "GO_VERSION=$(iso20022-client/bin/go version)" >> $GITHUB_OUTPUT
- name: Print go version
run: echo ${{ steps.goversion.outputs.GO_VERSION }}
- name: Setup go cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ steps.goversion.outputs.GO_VERSION }}
- name: Setup linter cache
uses: actions/cache@v3
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: ScribeMD/docker-cache@0.5.0
if: ${{ matrix.docker-cache }}
with:
key: ${{ runner.os }}-docker-v3-scribemd-${{ steps.get-year-week.outputs.date }} # year-week key
- name: Prepare dependencies
run: |
crust build/me
crust build
crust znet remove
coreum-builder build/me
cd $(pwd)/iso20022-client
make deps
- name: Run ${{ matrix.ci_step }}
working-directory: ./iso20022-client
run: ${{ matrix.command }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ github.workspace }}/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