From 7a40c4584e9118e1b218ff7c424e524b046abfbc Mon Sep 17 00:00:00 2001 From: Manlio Perillo Date: Tue, 2 May 2023 11:06:58 +0200 Subject: [PATCH] Restore unit tests --- .github/workflows/ci.yml | 36 ++++++++++++++++++------------------ build.zig | 5 ++--- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab821c6..d071d8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,21 +27,21 @@ jobs: - name: Check compatibility with old Zig compilers run: ci/compat.sh -# test: -# name: Unit Tests -# strategy: -# matrix: -# os: [ubuntu-latest, windows-latest, macos-latest] -# runs-on: ${{ matrix.os }} -# timeout-minutes: 30 -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# -# - name: Setup Zig -# uses: goto-bus-stop/setup-zig@v2 -# with: -# version: master -# -# - name: Run unit tests -# run: zig build test + test: + name: Unit Tests + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Zig + uses: goto-bus-stop/setup-zig@v2 + with: + version: master + + - name: Run unit tests + run: zig build test diff --git a/build.zig b/build.zig index 38890c2..383a231 100644 --- a/build.zig +++ b/build.zig @@ -210,9 +210,8 @@ pub fn build(b: *Build) !void { } ziglings_step.dependOn(prev_step); - // Disabled, see issue 272 - // const test_step = b.step("test", "Run all the tests"); - // // test_step.dependOn(tests.addCliTests(b, &exercises)); + const test_step = b.step("test", "Run all the tests"); + test_step.dependOn(tests.addCliTests(b, &exercises)); } var use_color_escapes = false;