From 1bfe3cf7a2a8543f4c1722070ebd1edcc96f88d6 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Tue, 3 Jan 2023 14:39:24 +0100 Subject: [PATCH] Run `cargo test` on pull requests This uses the `Cargo.toml` file in the repository to test the provided solutions. --- .github/workflows/build.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ab02369..d51167f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,8 +6,11 @@ on: branches: - main +env: + CARGO_TERM_COLOR: always + jobs: - build: + mdbook: runs-on: ubuntu-latest steps: - name: Checkout @@ -24,3 +27,15 @@ jobs: - name: Test code snippets run: mdbook test + + cargo: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Rust cache + uses: Swatinem/rust-cache@v2 + + - name: Test Rust code + run: cargo test