Skip to content

Create swift.yml

Create swift.yml #9

Workflow file for this run

# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Swift
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: macos-latest-large
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Setup Docker
uses: douglascamata/setup-docker-macos-action@v1-alpha
- name: Run PocketBase
run: docker compose up -d
- name: Build
run: swift build
- name: Run tests
run: swift test
- name: Tear Down PocketBase
if: always()
run: docker compose down