-
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (37 loc) · 1.1 KB
/
swift.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
name: Build, Lint & Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
run-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Enable development dependencies
run: |
sed -i.bak "s/\/\/dev//g" Package.swift
- name: Build
run: swift build
- name: Run tests
run: swift test --enable-code-coverage
- name: Generate Code Coverage
run: |
xcrun llvm-cov export \
.build/debug/TPObfuscationPackageTests.xctest/Contents/MacOS/TPObfuscationPackageTests \
-instr-profile .build/debug/codecov/default.profdata \
--format="lcov" \
--ignore-filename-regex "\\.build" \
--ignore-filename-regex "Tests" > info.lcov
- name: Upload Code Coverage
run: |
bash <(curl -s https://codecov.io/bash) \
-J 'TPObfuscation' \
-G info.lcov
swiftlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1