forked from zhuhaow/NEKit
-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (37 loc) · 1.3 KB
/
ci.yml
File metadata and controls
39 lines (37 loc) · 1.3 KB
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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: macOS-latest
strategy:
matrix:
os: [iOS, macOS]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Convert OS to Carthage OS parameter
id: os_transform
run: |
printf "##[set-output name=os;]" && [[ "${{ matrix.os }}" = "iOS" ]] && echo ios || echo mac
- name: Recovering Carthage Cache
uses: actions/cache@v1.1.2
id: carthage_cache
with:
path: Carthage
key: ${{ matrix.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
- name: Building Carthage Dependencies
if: steps.carthage_cache.outputs.cache-hit != 'true'
run: carthage bootstrap --no-use-binaries --platform ${{ steps.os_transform.outputs.os }}
- name: Recovering Bundler Cache
uses: actions/cache@v1.1.2
id: bundler_cache
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Installing Bundler Dependencies
if: steps.bundler_cache.outputs.cache-hit != 'true'
run: bundle install
- name: Build and Test
run: bundle exec fastlane scan --scheme NEKit-${{ matrix.os }}