ci: Switch to maintained GitHub actions for Rust
This commit is contained in:
parent
405c00b91d
commit
e01838a70a
|
|
@ -12,17 +12,13 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@1.66
|
||||||
with:
|
- run: cargo build --all-features
|
||||||
profile: minimal
|
|
||||||
toolchain: 1.66
|
|
||||||
- name: Build
|
|
||||||
run: cargo build --verbose --all-features
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -D warnings
|
RUSTFLAGS: -D warnings
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
cargo test --all --verbose --all-features
|
cargo test --all --all-features
|
||||||
|
|
||||||
# Workaround for client document tests dependent on the remote
|
# Workaround for client document tests dependent on the remote
|
||||||
# helper. Tests which rely on these should be marked #[ignore] and
|
# helper. Tests which rely on these should be marked #[ignore] and
|
||||||
|
|
@ -32,16 +28,15 @@ jobs:
|
||||||
# expected, yet allow these document tests to be covered during
|
# expected, yet allow these document tests to be covered during
|
||||||
# integration testing.
|
# integration testing.
|
||||||
cargo install --locked --debug --path ./radicle-remote-helper
|
cargo install --locked --debug --path ./radicle-remote-helper
|
||||||
cargo test --all --verbose --all-features rad_patch -- --ignored
|
cargo test --all --all-features rad_patch -- --ignored
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
name: Docs
|
name: Docs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@1.66
|
||||||
- name: Docs
|
- run: cargo doc --all --all-features
|
||||||
run: cargo doc --all --all-features
|
|
||||||
env:
|
env:
|
||||||
RUSTDOCFLAGS: -D warnings
|
RUSTDOCFLAGS: -D warnings
|
||||||
|
|
||||||
|
|
@ -50,25 +45,16 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
path: |
|
||||||
components: clippy, rustfmt
|
~/.cargo/registry
|
||||||
toolchain: 1.66
|
~/.cargo/git
|
||||||
- name: Cache cargo registry
|
~/.rustup/toolchains
|
||||||
uses: actions/cache@v3
|
target
|
||||||
with:
|
key: ci-lint-${{ hashFiles('**/Cargo.lock') }}
|
||||||
path: ~/.cargo/registry
|
- run: rustup component add clippy rustfmt
|
||||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
- run: cargo clippy --all --tests
|
||||||
- name: Run clippy
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --all --tests
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -D warnings
|
RUSTFLAGS: -D warnings
|
||||||
- name: Check formating
|
- run: cargo fmt --all -- --check
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --all -- --check
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue