-
Notifications
You must be signed in to change notification settings - Fork 113
40 lines (40 loc) · 1.36 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
name: Build and Test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build-and-test:
runs-on: macos-13
strategy:
matrix:
destination: ['platform=iOS Simulator,OS=16.2,name=iPhone 14']
steps:
- name: Git - Checkout
uses: actions/checkout@v2
- name: List Xcode available versions
run: ls -n /Applications/ | grep Xcode*
- name: Setup - Xcode
run: sudo xcode-select -s /Applications/Xcode_14.2.app
- name: Setup - Ruby and bundler dependencies
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup carthage dependencies
run: ./scripts/bootstrap
- name: Lint
run: swiftlint
- name: Run unit tests
run: set -o pipefail && xcodebuild -workspace BoxSDK.xcworkspace -scheme BoxSDK-iOS -destination "${{ matrix.destination }}" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES -enableCodeCoverage YES test
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: get_branch
- run: bundle exec slather
env:
GIT_BRANCH: ${{ steps.get_branch.outputs.branch }}
CI_PULL_REQUEST: ${{ github.event.number }}
COVERAGE_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}