From 56c576cfa83303799ca8450723c90c69495cbd74 Mon Sep 17 00:00:00 2001 From: Matt Gacy Date: Sat, 2 Dec 2023 18:43:20 -0700 Subject: [PATCH 1/4] Add test workflow --- .github/workflows/tests.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..dfacd57 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,26 @@ +name: Tests + +on: + workflow_dispatch: + push: + branches: [ main ] + pull_request: + types: + - opened + - reopened + - ready_for_review + +jobs: + unit_tests: + name: Run Tests + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Build + run: swift build -v + + - name: Run tests + run: swift test -v From e31821a7b3bba4e63d11536d73094270c567c2d5 Mon Sep 17 00:00:00 2001 From: Matt Gacy Date: Sat, 2 Dec 2023 18:49:54 -0700 Subject: [PATCH 2/4] Fix runner image --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dfacd57..b0f093e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ on: jobs: unit_tests: name: Run Tests - runs-on: macos-latest + runs-on: macos-13 steps: - name: Checkout From 9f329fab373b26ef53077b8922d89f42ff21b99f Mon Sep 17 00:00:00 2001 From: Matt Gacy Date: Sat, 2 Dec 2023 18:54:02 -0700 Subject: [PATCH 3/4] Update triggers, dependencies --- .github/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b0f093e..2f839cb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,16 +8,18 @@ on: types: - opened - reopened + - synchronize - ready_for_review jobs: unit_tests: + if: github.event.pull_request.draft == false name: Run Tests runs-on: macos-13 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build run: swift build -v From bd9c15f21f062b4b8ceac08afe9a7c22288048cd Mon Sep 17 00:00:00 2001 From: Matt Gacy Date: Sat, 2 Dec 2023 18:59:01 -0700 Subject: [PATCH 4/4] Remove verbose --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2f839cb..b338552 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: Build - run: swift build -v + run: swift build - name: Run tests - run: swift test -v + run: swift test