name: CI

on:
  push:
    branches: [ master, development ]
  pull_request:
    branches: [ master, development ]

jobs:
  build:

    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: swift build -v
    - name: Run tests
      run: swift test -v

name: "GRDB CI"

on:
  push:
    branches: 
      - master
      - development
    paths:
      - 'GRDB/**'
      - 'Tests/**'
      - '.github/workflows/**'
      - 'Package.swift'
  pull_request:
    paths:
      - 'GRDB/**'
      - 'Tests/**'
      - '.github/workflows/**'
      - 'Package.swift'

concurrency: 
  group: ${{ github.ref_name }}
  cancel-in-progress: true
jobs:
  macOS:
    name: Test macOS, All Xcodes and Swifts
    runs-on: ${{ matrix.runsOn }}
    env:
      DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
    timeout-minutes: 10
    strategy:
      fail-fast: false
      matrix:
        include:
          - xcode: "Xcode_13.3.1.app"
            runsOn: macOS-12
            name: "macOS 12, Xcode 13.3.1, Swift 5.6"
            shell: "/bin/zsh {0}"
          - xcode: "Xcode_13.2.1.app"
            runsOn: macOS-11
            name: "macOS 11, Xcode 13.2.1, Swift 5.5.2"
            shell: "/bin/zsh {0}"
          - xcode: "Xcode_13.1.app"
            runsOn: macOS-11
            name: "macOS 11, Xcode 13.1, Swift 5.5.1"
            shell: "/bin/zsh {0}"
          - xcode: "Xcode_13.0.app"
            runsOn: macOS-11
            name: "macOS 11, Xcode 13.0, Swift 5.5.0"
            shell: "/bin/zsh {0}"
          - xcode: "Xcode_12.5.1.app"
            runsOn: macOS-11
            name: "macOS 11, Xcode 12.5.1, Swift 5.4"
            shell: "/bin/zsh {0}"
          - xcode: "Xcode_12.4.app"
            runsOn: macOS-10.15
            name: "macOS 10.15, Xcode 12.4, Swift 5.3"
            shell: "/bin/zsh {0}"
    steps:
      - uses: actions/checkout@v2
      - name: ${{ matrix.name }}
        run: make test_framework_GRDBOSX_maxSwift

Test macOS, All Xcodes and Swifts
Test macOS, All Xcodes and Swifts
