From dd72f78fcd95b53993b90e023f11d5e5c8bd8a58 Mon Sep 17 00:00:00 2001 From: Ayman Hamed Date: Thu, 2 Jul 2026 00:05:45 +0300 Subject: [PATCH] ci: add GitHub Actions build & test workflow --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7016fda --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-test: + name: Build & Test (macOS) + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + + - name: Select Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Show toolchain + run: swift --version + + - name: Cache SwiftPM + uses: actions/cache@v4 + with: + path: .build + key: ${{ runner.os }}-spm-${{ hashFiles('Package.swift', 'Package.resolved') }} + restore-keys: ${{ runner.os }}-spm- + + - name: Build + run: swift build -v + + - name: Test + run: swift test -v \ No newline at end of file