From 869ad9d3e5e588a1373bb601c86702d1d6376c86 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 24 Sep 2024 22:07:21 +0200 Subject: [PATCH] move doc and test to another job --- .github/workflows/rust.yml | 45 ++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1e8e31bbcf1..cd89daf281f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,8 +8,8 @@ env: NIGHTLY_VERSION: nightly-2024-09-11 jobs: - fmt-crank-check-test: - name: Format + check + test + fmt-lint-check: + name: Format + lint + check runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -35,6 +35,12 @@ jobs: - name: Lint vertical spacing run: ./scripts/lint.py + - name: clippy + run: cargo clippy --all-targets --all-features -- -D warnings + + - name: clippy release + run: cargo clippy --all-targets --all-features --release -- -D warnings + - name: check --all-features run: cargo check --locked --all-features --all-targets @@ -60,6 +66,32 @@ jobs: - name: cargo check -p test_egui_extras_compilation run: cargo check -p test_egui_extras_compilation + # --------------------------------------------------------------------------- + + test_doc: + name: Check docs + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.76.0 + + - name: Install packages (Linux) + if: runner.os == 'Linux' + uses: awalsh128/cache-apt-pkgs-action@v1.4.2 + with: + packages: libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev libgtk-3-dev # libgtk-3-dev is used by rfd + version: 1.0 + execute_install_scripts: true + + - name: Set up cargo cache + uses: Swatinem/rust-cache@v2 + + - name: Test + run: cargo test --all-features + - name: Test doc-tests run: cargo test --doc --all-features @@ -69,15 +101,6 @@ jobs: - name: cargo doc --document-private-items run: cargo doc --document-private-items --no-deps --all-features - - name: Test - run: cargo test --all-features - - - name: clippy - run: cargo clippy --all-targets --all-features -- -D warnings - - - name: clippy release - run: cargo clippy --all-targets --all-features --release -- -D warnings - # --------------------------------------------------------------------------- check_wasm: