From 86bd5ea42d37b4efb6a0615cd5c374af762b1e3b Mon Sep 17 00:00:00 2001 From: iTrooz Date: Sun, 27 Aug 2023 19:07:56 +0200 Subject: [PATCH] ci: move check job in this repository --- .github/workflows/build.yml | 40 ++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43d3ea79..e8194e0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,45 @@ concurrency: ci-${{ github.ref }} jobs: check: - uses: iTrooz/vtavernier-github-workflows/.github/workflows/check-rust.yml@v1 + runs-on: ubuntu-latest + + env: + RUSTFLAGS: "-D warnings" + RUSTDOCFLAGS: "-D warnings" + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Cargo cache + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + # Calling rustup show will install the toolchain in rust-toolchain + - name: Install toolchain + id: rustup + run: rustup show + + - name: Fetch dependencies + run: cargo fetch + + - name: Run cargo fmt + run: cargo fmt -- --check + + - name: Run cargo check + run: cargo check --all-features + + - name: Run cargo clippy + run: cargo clippy --all-features + + - name: Run cargo doc + run: cargo doc --all-features --no-deps test: runs-on: ${{ matrix.runs-on }}