name: Test Swift
on:
  workflow_dispatch:
  push:
    paths:
      - "bdk-ffi/**"
      - "bdk-swift/**"
  pull_request:
    paths:
      - "bdk-ffi/**"
      - "bdk-swift/**"

jobs:
  build:
    name: "Build and test"
    runs-on: macos-12
    steps:
      - name: "Checkout"
        uses: actions/checkout@v3

      - name: "Build Swift package"
        working-directory: bdk-swift
        run: bash ./build-local-swift.sh

      - name: "Run Swift tests"
        working-directory: bdk-swift
        run: swift test --skip LiveWalletTests --skip LiveTxBuilderTests
