Skip to content

Commit 78bc2f3

Browse files
authored
Merge pull request #18 from devxoul/github-actions
Add CI
2 parents 9161ee5 + 493c8b5 commit 78bc2f3

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
runs-on: macOS-latest
12+
strategy:
13+
matrix:
14+
env:
15+
- sdk: iphonesimulator12.2
16+
destination: platform=iOS Simulator,name=iPhone XS,OS=12.2
17+
18+
- sdk: appletvsimulator12.2
19+
destination: OS=12.2,name=Apple TV
20+
21+
steps:
22+
- uses: actions/checkout@v1
23+
24+
- name: Generate Xcode Project
25+
run: swift package generate-xcodeproj --enable-code-coverage
26+
27+
- name: Build and Test
28+
run: |
29+
set -o pipefail && xcodebuild clean build test \
30+
-project "$PROJECT" \
31+
-scheme "$SCHEME" \
32+
-sdk "$SDK" \
33+
-destination "$DESTINATION" \
34+
-configuration Debug \
35+
-enableCodeCoverage YES \
36+
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c;
37+
env:
38+
PROJECT: SwiftyImage.xcodeproj
39+
SCHEME: SwiftyImage-Package
40+
SDK: ${{ matrix.env.sdk }}
41+
DESTINATION: ${{ matrix.env.destination }}
42+
43+
- name: Upload Code Coverage
44+
run: |
45+
bash <(curl -s https://codecov.io/bash) \
46+
-J SwiftyImage \
47+
-t d308ef2d-d20b-4423-bd44-b92c082f7683

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ SwiftyImage
33

44
![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)
55
[![CocoaPods](http://img.shields.io/cocoapods/v/SwiftyImage.svg?style=flat)](https://cocoapods.org/pods/SwiftyImage)
6+
[![CI](http://github.com/devxoul/SwiftyImage/actions)](http://github.com/devxoul/SwiftyImage/SwiftyImage/workflows/CI/badge.svg)
67

78
The most sexy way to use images in Swift.
89

codecov.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ignore:
2+
- "Tests/"
3+
4+
coverage:
5+
status:
6+
project: no
7+
patch: no
8+
changes: no

0 commit comments

Comments
 (0)