From 2dd7c55fa5a0e19bc24ca3cd629fea88351a48cb Mon Sep 17 00:00:00 2001 From: NonlinearFruit <1123benji5813@gmail.com> Date: Fri, 12 Jul 2024 22:20:03 -0600 Subject: [PATCH] Reuseable nuUnit CI --- .github/workflows/nushell-tests.yml | 24 ++++++++++++++++++++++++ .github/workflows/test.yml | 14 +++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/nushell-tests.yml diff --git a/.github/workflows/nushell-tests.yml b/.github/workflows/nushell-tests.yml new file mode 100644 index 0000000..4a1bc00 --- /dev/null +++ b/.github/workflows/nushell-tests.yml @@ -0,0 +1,24 @@ +name: Check nushell scripts + +on: + workflow_call: + nushell_version: + config-path: + required: true + type: string + nuunit_version: + config-path: + required: true + type: string + +jobs: + basic-usage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.0.0 + - uses: hustcer/setup-nu@main + with: + version: ${{ inputs.nushell_version }} + - run: | + nu -c 'http get https://raw.githubusercontent.com/NonlinearFruit/nuUnit/${{ inputs.nuunit_version }}/nuunit.nu | save -f nuunit.nu' + nu nuunit.nu diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 527f7a1..03bb7af 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,12 +3,8 @@ name: test on: push jobs: - basic-usage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4.0.0 - - uses: hustcer/setup-nu@main - with: - version: "*" - - run: | - nu nuunit.nu + nushell-tests: + uses: NonlinearFruit/nuUnit/.github/workflows/nushell-tests.yml@master + with: + nushell_version: "*" + nuunit_version: "master"