Skip to content

Merge pull request #15 from onomyprotocol/aaron-main-dev #32

Merge pull request #15 from onomyprotocol/aaron-main-dev

Merge pull request #15 from onomyprotocol/aaron-main-dev #32

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- 'main'
jobs:
go_tests:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.19
id: go
- name: Checkout
uses: actions/checkout@v2
- name: test suite
run: |
make test
rust_tests:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.19
id: go
- name: Install Rust components
run: |
rustup set profile minimal
rustup default stable
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: test suite
run: |
cargo r --bin ics_with_onomyd
cargo r --bin clean
gofumpt:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.19
id: go
- name: Checkout
uses: actions/checkout@v2
- name: test suite
run: |
go install mvdan.cc/gofumpt@latest
test -z "$(gofumpt -d -e -extra . | tee /dev/stderr)"
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Acquire the most recent nightly with a rustfmt component
- name: Install most recent Rustfmt
run: |
rustup set profile minimal
rustup default "nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustfmt)"
rustup component add rustfmt
- name: Run `cargo fmt`
run: |
cargo fmt -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Acquire the most recent nightly with a clippy component
- name: Install most recent Clippy
run: |
rustup set profile minimal
rustup default "nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/clippy)"
rustup component add clippy
- name: Run `cargo clippy`
run: |
cargo clippy --all --all-targets --all-features -- -D clippy::all