From f7e3e6a939fd592a8aa84768a14f8b0a4af41783 Mon Sep 17 00:00:00 2001 From: Marcin Anforowicz Date: Tue, 10 Dec 2024 18:05:27 -0800 Subject: [PATCH] GitHub action fix. --- .github/workflows/check.yml | 45 +++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 30 +++++-------------------- 2 files changed, 51 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..a0c560b --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,45 @@ +# GitHub workflow which runs on pushes. +# Does multiple checks with nightly Rust on Linux. + +name: All Checks + +on: + push: + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: All Checks + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - nightly + steps: + - uses: actions/checkout@v3 + + - name: Update rustup + run: rustup update + + - name: Build + run: cargo build --verbose + + - name: Test + run: cargo test --verbose + + - name: Clippy + run: cargo clippy --verbose + + - name: Check documentation + run: cargo doc --no-deps --verbose + + - name: Check formatting + run: cargo fmt --check --verbose + + - name: Install cargo audit + run: cargo install --locked cargo-audit + + - name: Audit dependencies + run: cargo audit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2697858..5a9a984 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,29 +1,26 @@ -# GitHub workflow which automatically -# tests code on pushes and pull requests. +# GitHub workflow which runs on pushes. +# Does a build and test with stable Rust on 3 different platforms. -name: Cargo Build & Test +name: Stable Build & Test on: push: - # pull_request: env: CARGO_TERM_COLOR: always jobs: build_and_test: - name: Rust Build & Test + name: Stable Build & Test runs-on: ${{ matrix.os }} strategy: matrix: os: - # - ubuntu-latest - # - windows-latest + - ubuntu-latest + - windows-latest - macos-latest toolchain: - stable - # - beta - # - nightly steps: - uses: actions/checkout@v3 @@ -35,18 +32,3 @@ jobs: - name: Test run: cargo test --verbose - - - name: Clippy - run: cargo clippy --verbose - - - name: Check documentation - run: cargo doc --no-deps --verbose - - - name: Check formatting - run: cargo fmt --check --verbose - - - name: Install cargo audit - run: cargo install --locked cargo-audit - - - name: Audit dependencies - run: cargo audit