Skip to content

Commit 41925af

Browse files
committed
e Switch from Travis to GitHub Actions
1 parent 7077650 commit 41925af

File tree

4 files changed

+64
-17
lines changed

4 files changed

+64
-17
lines changed

.github/workflows/build.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build
2+
on: [ push, pull_request ]
3+
4+
env:
5+
project: Source/OCHamcrest.xcodeproj
6+
7+
jobs:
8+
build:
9+
name: Build without tests
10+
runs-on: macos-latest
11+
strategy:
12+
matrix:
13+
run-config:
14+
- { scheme: 'OCHamcrest-iOS', -sdk: 'iphonesimulator', destination: 'platform=iOS Simulator,OS=latest,name=iPhone 8' }
15+
- { scheme: 'OCHamcrest-tvOS', -sdk: 'appletvsimulator', destination: 'platform=tvOS Simulator,OS=latest,name=Apple TV' }
16+
- { scheme: 'OCHamcrest-watchOS', -sdk: 'watchsimulator', destination: 'platform=watchOS Simulator,OS=latest,name=Apple Watch Series 5 - 44mm' }
17+
steps:
18+
- name: Check out project
19+
uses: actions/checkout@v2
20+
- name: Show current version of Xcode
21+
run: xcodebuild -version
22+
- name: Build
23+
run: xcodebuild build -project $project -scheme '${{ matrix.run-config['scheme'] }}' -sdk '${{ matrix.run-config['sdk'] }}' -destination '${{ matrix.run-config['destination'] }}' | xcpretty
24+
25+
test:
26+
name: Build, test, report coverage
27+
runs-on: macos-latest
28+
env:
29+
scheme: OCHamcrest
30+
steps:
31+
- name: Check out project
32+
uses: actions/checkout@v2
33+
- name: Show current version of Xcode
34+
run: xcodebuild -version
35+
- name: Build & test
36+
run: xcodebuild test -project $project -scheme $scheme -sdk macosx | xcpretty
37+
- name: Install gems
38+
run: |
39+
bundle config path vendor/bundle
40+
bundle config set --local without 'documentation'
41+
bundle install --jobs 4 --retry 3
42+
- name: Extract branch name
43+
shell: bash
44+
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
45+
id: get_branch
46+
- name: Report coverage
47+
run: bundle exec slather
48+
env:
49+
GIT_BRANCH: ${{ steps.get_branch.outputs.branch }}
50+
CI_PULL_REQUEST: ${{ github.event.number }}
51+
COVERAGE_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
53+
podspec:
54+
name: Pod Spec Lint
55+
runs-on: macos-latest
56+
steps:
57+
- name: Check out project
58+
uses: actions/checkout@v2
59+
- name: Lint the pod spec
60+
run: pod spec lint --quick

.slather.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
ci_service: github
12
coverage_service: coveralls
23
xcodeproj: ./Source/OCHamcrest.xcodeproj
34
scheme: OCHamcrest
45
ignore:
56
- Source/Tests/*
6-

.travis.yml

-16
This file was deleted.

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'slather'

0 commit comments

Comments
 (0)