nomos-node/.github/workflows/main.yml

85 lines
2.2 KiB
YAML

# copy of https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
# These tasks are supposed to run when updating the main branch.
# The steps are identical to those that run on PRs, but this script includes macos environment.
on:
push:
branches: [main]
name: Main branch updates check
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: check
test:
name: Test Suite
strategy:
fail-fast: false # all OSes should be tested even if one fails (default: true)
matrix:
os: [ubuntu-latest, windows-latest] # macos-latest removed because 1 min on macos is x10 on GH runtime.
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-go@v3 # we need go to build go-waku
with:
go-version: '1.19'
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: build
args: --all-features
- uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: test
args: --all-features
lints:
name: Rust lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Run cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: clippy
args: -- --deny warnings