From 4682014117de5a26e65dfc7310049c874903669d Mon Sep 17 00:00:00 2001 From: Liam Woodleigh Date: Sat, 30 Dec 2023 02:23:18 +0100 Subject: [PATCH 1/2] :construction_worker: Use cargo-nextest to improve test speed --- .cargo/config.toml | 3 +++ .github/workflows/main.yml | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index c91c3f3..fe4655d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,5 @@ [net] git-fetch-with-cli = true + +[alias] # command aliases +t = "nextest run" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ca523e..2cc1453 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,9 +31,14 @@ jobs: - name: Run check run: cargo check --all - - name: Run tests - run: cargo test + - name: Install cargo-nextest + uses: taiki-e/install-action@v2 + with: + tool: nextest + - name: Perform tests + continue-on-error: false + run: cargo nextest run - name: Run format run: | cargo check --all From 519b0f36f04d12f8aaa3ef55cdccd894d0c28898 Mon Sep 17 00:00:00 2001 From: Liam Woodleigh Date: Sat, 30 Dec 2023 14:38:46 +0100 Subject: [PATCH 2/2] :hammer: Add justfile for running tests --- justfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000..f0334b8 --- /dev/null +++ b/justfile @@ -0,0 +1,12 @@ +#!/usr/bin/env -S just --justfile +set windows-shell := ["powershell.exe", "-NoLogo", "-Command"] +set dotenv-load := true +export CARGO_TERM_COLOR := "always" + +# Show available commands +default: + @just --list --justfile {{justfile()}} + +# Run tests using cargo test +test: + cargo nextest run