-
Notifications
You must be signed in to change notification settings - Fork 7
72 lines (59 loc) · 1.91 KB
/
build.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
name: Build and test
on:
push:
branches:
- main
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: build
runs-on: macos-13
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install SSH Key
uses: shimataro/[email protected]
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: github.com
- name: Adding Known Hosts
run: ssh-keyscan -H github.com >> ~/.ssh/known_hosts
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.2'
- name: Build and test
run: |
swift build
- name: Generate momd
run: |
/Applications/Xcode.app/Contents/Developer/usr/bin/momc \
./AtalaPrismSDK/Pluto/Sources/Resources/PrismPluto.xcdatamodeld \
.build/debug/AtalaPRISMSDK_Pluto.bundle/PrismPluto.momd
swift test --enable-code-coverage
- name: Generate lcov
run: |
xcrun llvm-cov export \
-format="lcov" \
.build/debug/AtalaPRISMSDKPackageTests.xctest/Contents/MacOS/AtalaPRISMSDKPackageTests \
-instr-profile .build/debug/codecov/default.profdata \
--ignore-filename-regex='.build/.*' \
--ignore-filename-regex='Tests/.*' \
--ignore-filename-regex='Core/.*' > lcov.info
- name: Build coverage report
run: genhtml lcov.info -o coverage_html -q
- name: Publish to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: coverallsapp/github-action@v2
with:
file: "lcov.info"
- name: Publish Code Coverage Report
uses: actions/upload-artifact@v4
with:
name: swift-coverage
path: "coverage_html"