Updates for Xcode 15 #100
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build and Test | |
run: make | |
env: | |
SNAPSHOT_ARTIFACTS: "$PWD/.snapshots" | |
SNAPSHOT_ENV: ci | |
- name: Copy Snapshots | |
if: ${{ failure() }} | |
run: | | |
mkdir .snapshots | |
cp -r $(find . -name Knob-macOSTests)/__Snapshots__ .snapshots/ | |
- name: Upload Snapshot Failures | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: snapshots | |
path: .snapshots/ | |
- name: Get Test Coverage | |
run: | | |
set -- $(< percentage.txt) | |
echo "PERCENTAGE=${1}" >> ${GITHUB_ENV} | |
- name: Create Coverage Badge | |
uses: schneegans/dynamic-badges-action@v1.1.0 | |
with: | |
auth: ${{ secrets.GIST_UPDATE }} | |
gistID: b307c10e9eb7882e6a83a3bcb1e5cd5d | |
filename: Knob-coverage.json | |
label: Coverage | |
message: ${{ env.PERCENTAGE }} | |
color: success |