Skip to content

Merge pull request #21 from playbook-ui/drop-support-for-carthage #50

Merge pull request #21 from playbook-ui/drop-support-for-carthage

Merge pull request #21 from playbook-ui/drop-support-for-carthage #50

Workflow file for this run

name: GitHub Actions
on:
pull_request:
push:
branches:
- main
jobs:
validation:
name: Validation
runs-on: macos-11
strategy:
matrix:
xcode_version:
- 12.5.1
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v2
- name: Get SwiftPM cache
uses: actions/cache@v2
with:
path: Tools/.build
key: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-${{ hashFiles('Tools/Package.resolved') }}
restore-keys: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-
- name: Validation
if: matrix.xcode_version == '12.5.1'
run: |
make all && [ -z "$(git status --porcelain)" ]
make lint
test:
name: Test on macOS
runs-on: macos-11
strategy:
matrix:
xcode_version:
- 12.4
- 12.5.1
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v2
- name: Show environments
run: |
swift --version
xcodebuild -version
- name: Get npm cache
id: npm-cache
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-0-npm-${{ hashFiles('package-lock.json') }}
restore-keys: ${{ runner.os }}-0-npm-
- name: Install npm packages
if: steps.npm-cache.cache.outputs.cache-hit != 'true'
run: make npm
- name: Generate snapshots
working-directory: Example
run: xcodebuild test -scheme SampleApp -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro' ENABLE_TESTABILITY=YES | xcpretty -c
- name: Visual regression test
if: matrix.xcode_version == '12.5.1'
run: npx percy upload Example/Snapshots
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}