forked from hyperdevs-team/mini-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (76 loc) · 2.42 KB
/
build-and-tests.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: "build-and-tests"
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build:
name: Check build & tests
runs-on: apps-ci
timeout-minutes: 120
steps:
- name: Remove any previous hook 🥸
run: rm -rf .git/hooks
- name: Checkout 🔎
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache for Gems 💎
uses: actions/cache@v3
with:
path: |
.gems
~/.bundle
key: ${{ runner.os }}-cache-gems-${{ hashFiles('**/Gemfile.lock') }}
- name: Rake ⚙️
run: arch -arm64 rake
- name: Run iOS tests ⚙️
run: arch -arm64 bundle exec fastlane test_scheme scheme:Mini-iOS configuration:Debug name:iOS
- name: Upload coverage for iOS to Codecov 📋
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: ./output/iOS/Mini-iOS.xcresult
flags: ios
fail_ci_if_error: true
name: codecov-ios
gcov_ignore: Tests/*
- name: Run tvOS tests ⚙️
run: arch -arm64 bundle exec fastlane test_scheme scheme:Mini-tvOS configuration:Debug name:tv
- name: Upload coverage for tvOS to Codecov 📋
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: ./output/tv/Mini-tvOS.xcresult
flags: tv
fail_ci_if_error: true
name: codecov-tv
gcov_ignore: Tests/*
- name: Run mac tests ⚙️
run: arch -arm64 bundle exec fastlane test_scheme scheme:Mini-macOS configuration:Debug name:mac
- name: Upload coverage for mac to Codecov 📋
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: ./output/mac/Mini-macOS.xcresult
flags: mac
fail_ci_if_error: true
name: codecov-mac
gcov_ignore: Tests/*
- name: Danger 🚨
run: bundle exec danger
if: github.event_name == 'pull_request'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.THORBOT_GITHUB_API_TOKEN }}
- name: Save Output 📦
uses: actions/upload-artifact@v3
with:
name: output
path: ${{ github.workspace }}/output