Set up a GitHub workflow for Preternatural/AI #34
Workflow file for this run
This file contains 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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# GitHub recommends pinning actions to a commit SHA. | |
# To get a newer version, you will need to update the SHA. | |
# You can also reference a tag or branch, but the action may change without warning. | |
name: Test Swift Package | |
# Housekeeping of the `brew` command on Github's virtual runner. | |
env: | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
on: | |
# Any PR event (opened, reopened, updated, assigned) targeted to `main` will trigger the workflow. | |
pull_request: | |
branches: [main] | |
# Enables button in the github.com so that workflow can be dispatched manually using the button in the browser. | |
workflow_dispatch: | |
# Stale / pending workflow runs will be aborted upon branch updates. | |
# https://stackoverflow.com/a/72408109/6942800 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test_swift_package: | |
name: Swift Package testing | |
runs-on: ${{ matrix.macos }} | |
strategy: | |
fail-fast: false | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-11-Readme.md | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md | |
matrix: | |
xcode: ['14.3.1', '15.0'] | |
macos: ['macos-13'] | |
command: ['build'] | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v2 | |
- name: Setup ruby and bundler | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
- name: Setup non-ruby dependencies (xcodes) | |
run: which xcodes || brew install xcodes | |
- name: Install Bundler dependencies | |
run: bundle install | |
- name: Run 'test_swift_package' lane | |
uses: maierj/fastlane-action@v3.0.0 | |
with: | |
lane: 'test_swift_package' | |
options: '{ "xcode": "${{ matrix.xcode }}", "command": "${{ matrix.command }}" }' | |
verbose: true |