* Continue CI steps even when one of them fails * Build all features in CI * Test all features in CI
86 lines
2.2 KiB
YAML
86 lines
2.2 KiB
YAML
# copy of https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
|
|
# Steps for checking PRs.
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
|
|
name: PR 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
|
|
if: ${{ !startsWith(github.event.pull_request.title, '[WIP]') && !contains(github.event.label.name, 'DO NOT MERGE') }}
|
|
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
|