Skip to content

Commit

Permalink
Merge pull request #678 from badoo/ci
Browse files Browse the repository at this point in the history
Add github actions
  • Loading branch information
wiruzx authored Sep 26, 2020
2 parents b520bb7 + 745a3ea commit 3f4318f
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 10 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Swift

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Test Chatto
run: ./scripts/test.sh chatto
- name: Coverage for Chatto
run: bash <(curl -s https://codecov.io/bash) -J 'Chatto'
- name: Test ChattoAdditions
run: ./scripts/test.sh additions
- name: Coverage for ChattoAdditions
run: bash <(curl -s https://codecov.io/bash) -J 'ChattoAdditions'
- name: Test ChattoApp
run: ./scripts/test.sh app
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

25 changes: 25 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

WORKSPACE='Chatto.xcworkspace'
SCHEME='Chatto'

case "$1" in
chatto) ;;
additions)
SCHEME='ChattoAdditions'
;;
app)
WORKSPACE='ChattoApp/ChattoApp.xcworkspace'
SCHEME='ChattoApp'
;;
*) echo "Invalid operation"
exit 1
;;
esac

xcodebuild clean build test \
-workspace $WORKSPACE \
-scheme $SCHEME \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 11' \
-configuration Debug | xcpretty

0 comments on commit 3f4318f

Please sign in to comment.