From 9fee2a5f4c936ef8bf72f25185bbf83efc64d642 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 25 Jul 2024 22:58:31 +0200 Subject: [PATCH] Create separate runner for examples. --- .github/workflows/pr-tests.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 6418ebb9d..e3884ca56 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -90,6 +90,29 @@ jobs: run: cargo nextest run --archive-file tests.tar.zst --verbose env: PILCOM: ${{ github.workspace }}/pilcom/ + + run_examples: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: ⚡ Restore rust cache + id: cache + uses: actions/cache/restore@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + Cargo.lock + key: ${{ runner.os }}-cargo-pr-tests-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-pr-tests- + - name: Install Rust toolchain 1.77 (with clippy and rustfmt) + run: rustup toolchain install 1.77-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.77-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.77-x86_64-unknown-linux-gnu - name: Run examples run: cargo run --example hello_world