From 43309f1e1b3a585558df817811815fa4a557c312 Mon Sep 17 00:00:00 2001 From: Brandon <32753167+btoms20@users.noreply.github.com> Date: Thu, 8 Feb 2024 11:41:15 -0800 Subject: [PATCH] Update build+test.yml Now testing the latest three versions of Swift on both ubuntu-latest and macos-latest. We're also bypassing tests when only making changes to README.md and when a PR against `main` is in a `draft` state. --- .github/workflows/build+test.yml | 34 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build+test.yml b/.github/workflows/build+test.yml index d42ac1a..2ce8395 100644 --- a/.github/workflows/build+test.yml +++ b/.github/workflows/build+test.yml @@ -1,31 +1,31 @@ -name: Build & Test (macos & linux) +name: Build & Test on: push: + paths-ignore: + - 'README.md' branches: [ main ] pull_request: + paths-ignore: + - 'README.md' branches: [ main ] jobs: - build-macos: - - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - name: Build - run: swift build -v - - name: Run tests - run: swift test -v - - build-linux: - - runs-on: ubuntu-latest - + test-matrix: + if: ${{ !(github.event.pull_request.draft || false) }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + swift-version: ["5.9", "5.8", "5.7"] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: swift-actions/setup-swift@v1 + with: + swift-version: ${{ matrix.swift-version }} + - name: Get swift version + run: swift --version - name: Build run: swift build -v - - name: Run tests + - name: Test run: swift test -v