From ab36848004d910fdca1978bdec067dda93999cc6 Mon Sep 17 00:00:00 2001 From: "John K. Luebs" Date: Wed, 30 Oct 2024 17:22:59 -0500 Subject: [PATCH] Add CI --- .github/workflows/swift.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/swift.yml diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml new file mode 100644 index 0000000..b90cfb9 --- /dev/null +++ b/.github/workflows/swift.yml @@ -0,0 +1,31 @@ +name: Swift CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + name: Run Unit Tests on macOS and Linux + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest] + swift: ["5.9", "5.10, "6.0"] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Swift ${{ matrix.swift }} + uses: fwal/setup-swift@v1 + with: + swift-version: ${{ matrix.swift }} + os: ${{ matrix.os }} + + - name: Build and Run Tests + run: | + swift build --enable-test-discovery + swift test