Skip to content

Update build-and-test.yml #6

Update build-and-test.yml

Update build-and-test.yml #6

name: Build & Test
concurrency:
group: "quality"
cancel-in-progress: true
on:
push:
branches:
- main
- release
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- release
jobs:
build:
name: Build & Test
runs-on: macos-14
strategy:
matrix:
scheme:
- "CompoundPredicate"
steps:
- name: Install Swift
uses: swift-actions/[email protected]
with:
swift-version: 5.10.0
- name: Get swift version
run: swift --version
- uses: actions/checkout@v4
- name: Cache Dependencies
uses: actions/[email protected]
with:
path: .build
key: ${{ runner.os }}-${{ matrix.scheme }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-${{ matrix.scheme }}-spm2-
- name: Cache DerivedData
uses: actions/[email protected]
with:
path: "~/Library/Developer/Xcode/DerivedData"
key: ${{ runner.os }}-${{ matrix.scheme }}-deriveddata
- name: Build
run: swift build
- name: Run tests
run: swift test