-
-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (40 loc) · 1.03 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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