-
Notifications
You must be signed in to change notification settings - Fork 102
executable file
·67 lines (56 loc) · 1.9 KB
/
build-and-test.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
name: Testing
on: [push, pull_request]
jobs:
test:
name: Build and Test Nimble-Snapshots
runs-on: macOS-12
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1.4.0
with:
xcode-version: 14.0
- name: Set up Ruby 2.7.2
uses: ruby/setup-ruby@v1.84.0
with:
ruby-version: 2.7.2
bundler-cache: true
- name: "Create output dir"
run: mkdir output
- name: Run tests in Swift 5.X
run: xcodebuild -workspace 'Bootstrap/Bootstrap.xcworkspace' -sdk 'iphonesimulator' -scheme 'Bootstrap' -destination 'name=iPhone 8' SWIFT_VERSION=5.0 build test | tee output/xcodebuild_swift5.0.log
- name: Run Carthage integration test
run: carthage bootstrap --use-xcframeworks --platform iOS,tvOS && xcodebuild
shell: bash
- name: Swiftlint
run: |
swiftlint lint --no-cache --reporter junit | tee result.xml
- name: Store Swiftlint artifacts
uses: actions/upload-artifact@v2
with:
name: Swiftlint
path: |
result.xml
- name: Store output artifacts
uses: actions/upload-artifact@v2
with:
name: Output
path: |
output
- name: Store FailureDiffs artifacts
uses: actions/upload-artifact@v2
with:
name: FailureDiffs
path: |
Bootstrap/BootstrapTests/FailureDiffs/
- name: Danger action
uses: MeilCli/danger-action@v5.4.11
if: github.event_name == 'pull_request'
with:
plugins_file: 'Gemfile'
install_path: 'vendor/bundle'
danger_file: 'Dangerfile'
danger_id: 'danger-pr'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}