75 lines
2.0 KiB
YAML
75 lines
2.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build & Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: 1.66
|
|
- name: Build
|
|
run: cargo build --verbose --all-features
|
|
env:
|
|
RUSTFLAGS: -D warnings
|
|
- name: Run tests
|
|
run: |
|
|
cargo test --all --verbose --all-features
|
|
|
|
# Workaround for client document tests dependent on the remote
|
|
# helper. Tests which rely on these should be marked #[ignore] and
|
|
# whitelisted here.
|
|
#
|
|
# Marking them as 'ignored' will allow local testing to work as
|
|
# expected, yet allow these document tests to be covered during
|
|
# integration testing.
|
|
cargo install --locked --debug --path ./radicle-remote-helper
|
|
cargo test --all --verbose --all-features rad_patch -- --ignored
|
|
|
|
docs:
|
|
name: Docs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions-rs/toolchain@v1
|
|
- name: Docs
|
|
run: cargo doc --all --all-features
|
|
env:
|
|
RUSTDOCFLAGS: -D warnings
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
components: clippy, rustfmt
|
|
toolchain: 1.66
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cargo/registry
|
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Run clippy
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --all --tests
|
|
env:
|
|
RUSTFLAGS: -D warnings
|
|
- name: Check formating
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|