name: CI

on: [push]

jobs:
  xcode:
    name: Xcode ${{ matrix.xcode }}
    runs-on: macOS-10.14
    strategy:
      matrix:
        xcode: [10.1, 10.3, 11]
    steps:
    - uses: actions/checkout@v1
      with:
        submodules: true
    - run: sudo xcode-select -s '/Applications/Xcode_${{ matrix.xcode }}.app'
    - run: PLATFORM=macos ./script/travis-script-macos
    - run: PLATFORM=macos_static ./script/travis-script-macos
    - run: PLATFORM=ios ./script/travis-script-macos
    - run: PLATFORM=tvos ./script/travis-script-macos

  swiftpm_darwin:
    name: SwiftPM, Darwin, Xcode ${{ matrix.xcode }}
    runs-on: macOS-10.14
    strategy:
      matrix:
        xcode: [10.1, 10.3, 11]
    steps:
    - uses: actions/checkout@v1
    - run: sudo xcode-select -s '/Applications/Xcode_${{ matrix.xcode }}.app'
    - run: PLATFORM=swiftpm ./script/travis-script-macos

name: CI

on:
  push:
    branches:
      - master
    tags:
      - '*'
  pull_request:

jobs:
  xcode:
    name: Xcode ${{ matrix.xcode }}
    runs-on: macOS-10.14
    strategy:
      matrix:
        xcode: [10.1, 10.3, 11]
    steps:
    - uses: actions/checkout@v1
      with:
        submodules: true
    - run: sudo xcode-select -s '/Applications/Xcode_${{ matrix.xcode }}.app'
    - run: PLATFORM=macos ./script/travis-script-macos
    - run: PLATFORM=macos_static ./script/travis-script-macos
    - run: PLATFORM=ios ./script/travis-script-macos
    - run: PLATFORM=tvos ./script/travis-script-macos

  swiftpm_darwin:
    name: SwiftPM, Darwin, Xcode ${{ matrix.xcode }}
    runs-on: macOS-10.14
    strategy:
      matrix:
        xcode: [10.1, 10.3, 11]
    steps:
    - uses: actions/checkout@v1
    - run: sudo xcode-select -s '/Applications/Xcode_${{ matrix.xcode }}.app'
    - run: PLATFORM=swiftpm ./script/travis-script-macos

Add pull_request event to run tests for pull requests from forked repositories
[CI] Add pull_request event to run tests for pull requests from forked repositories
