From 6d2d176bdb3611bb216663757f397a1d96b2bc9b Mon Sep 17 00:00:00 2001 From: Antoine Stevan <44101798+amtoine@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:04:58 +0100 Subject: [PATCH] use the toolkit in the CI (#135) this PR uses the `toolkit` module and its `test` command to run the tests in the CI, such that we have only one point to change to modify how the tests run. --- .github/workflows/nupm-tests.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nupm-tests.yml b/.github/workflows/nupm-tests.yml index f2f6fab..fdcfa56 100644 --- a/.github/workflows/nupm-tests.yml +++ b/.github/workflows/nupm-tests.yml @@ -68,5 +68,11 @@ jobs: - name: Run the tests run: | - use ${{ steps.nu-setup.outputs.nupm_path }} - nupm test --show-stdout + # NOTE: required for `use nupm` to work inside `toolkit test` + "$env.NU_LIB_DIRS = [ (${{ steps.nu-setup.outputs.nupm_path }} | path dirname) ]" + | save --force /tmp/env.nu + # NOTE: required for `use toolkit.nu` to work + nu --env-config /tmp/env.nu --commands " + use toolkit.nu + toolkit test --verbose + "