Merge pull request #186 from edomora97/dependabot/cargo/clap-4.4.6 #897
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: [push, pull_request] | |
jobs: | |
clippy: | |
name: Test and Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Deps | |
run: | | |
sudo apt update | |
sudo apt install -yy libseccomp-dev build-essential fpc | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
id: install-rust | |
with: | |
components: clippy | |
- uses: taiki-e/install-action@nextest | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-test-${{ steps.install-rust.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} | |
- name: cargo nextest run (tests) | |
env: | |
RUST_BACKTRACE: 1 | |
run: cargo nextest run --all | |
- name: cargo clippy | |
run: tools/clippy.sh | |
rustfmt: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
id: install-rust | |
with: | |
components: rustfmt | |
- name: cargo fmt | |
run: cargo fmt --all -- --check | |
ts-bindings: | |
name: Typescript Bindings | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -yy libseccomp-dev | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
id: install-rust | |
with: | |
components: clippy | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-ts-bindings-${{ steps.install-rust.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} | |
- name: Rebuild bindings | |
working-directory: ./bindings/ts | |
run: ./rebuild.sh | |
- name: Check diff | |
working-directory: ./bindings/ts | |
run: git diff --exit-code src/ schema/ |