chore: add github actions for unit test and build scheme #3
Workflow file for this run
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Build on minimum supported platforms | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| inputs: | |
| identifier: | |
| required: true | |
| type: string | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: {} | |
| concurrency: | |
| group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-on-minimum-supported-platforms: | |
| name: ${{ matrix.os }} | |
| environment: unit-test # TODO: remove this | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - scheme: AWSAppSyncEvents | |
| os: iOS # Swift 5.9 (Xcode 15.0), iOS v13 | |
| sdk: iphonesimulator17.0 | |
| destination: platform=iOS Simulator,name=iPhone 14,OS=17.0 | |
| runner: macos-latest | |
| app: Xcode_15.0.1 | |
| - scheme: AWSAppSyncEvents | |
| os: macOS # Swift 5.9 (Xcode 15.0), macOS v10_15 | |
| sdk: macosx14.0 | |
| destination: platform=OS X,arch=x86_64 | |
| runner: macos-latest | |
| app: Xcode_15.0.1 | |
| - scheme: AWSAppSyncEvents | |
| os: tvOS # Swift 5.9 (Xcode 15.0), tvOS v13 | |
| sdk: appletvsimulator17.0 | |
| destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=17.0 | |
| runner: macos-latest | |
| app: Xcode_15.0.1 | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| with: | |
| persist-credentials: false | |
| token: ${{ secrets.PAT }} # TODO: remove this | |
| - name: ${{ matrix.os }} | |
| run: | | |
| sudo xcode-select -s "/Applications/${{ matrix.app }}.app" | |
| xcodebuild build \ | |
| -scheme ${{ matrix.scheme }} \ | |
| -destination "${{ matrix.destination }}" \ | |
| -sdk ${{ matrix.sdk }} \ | |
| | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]} |