Rebuild PlaybookUI from scratch #183
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
name: test | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.2.app | |
jobs: | |
validation: | |
name: Validation | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: Tools/bin | |
key: spm-${{ runner.os }}-${{env.DEVELOPER_DIR}}-${{ hashFiles('Tools/Package.swift') }} | |
- name: Validate lint | |
run: make lint | |
- name: Validate format | |
run: | | |
make format | |
if [ -n "$(git status --porcelain)" ]; then git diff && echo "Make sure that the code is formated by 'make format'."; exit 1; fi | |
- name: Validate projects | |
run: | | |
make proj | |
if [ -n "$(git status --porcelain)" ]; then git diff && echo "Make sure that projects are formated by 'make proj'."; exit 1; fi | |
test: | |
name: Test on macOS | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show environments | |
run: | | |
swift --version | |
xcodebuild -version | |
git branch | |
git shortlog | |
- name: Get npm cache | |
id: npm-cache | |
uses: actions/cache@v4 | |
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: Test library & Generate snapshots | |
run: set -o pipefail && xcodebuild test -scheme Playbook -destination 'platform=iOS Simulator,name=iPhone 15 Pro' | xcpretty -c | |
- name: Generate snapshots of example app | |
run: set -o pipefail && xcodebuild test -project Example/PlaybookExample.xcodeproj -scheme SamplePlaybook -destination 'platform=iOS Simulator,name=iPhone 15 Pro' | xcpretty -c | |
- name: Visual regression test | |
run: npx percy upload Snapshots | |
env: | |
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} |