Skip to content

Commit

Permalink
Migrate from travis to azure (#96)
Browse files Browse the repository at this point in the history
* Migrate from travis to azure

* Make scripts executable

* Add codecov token

* Add fail key to lint.sh

* Add fail flag to codecov.sh

* Add azure status to README.md
  • Loading branch information
hodovani committed May 18, 2019
1 parent 7d0b41c commit bd70003
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 47 deletions.
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

## React-like framework for native UI written in pure Swift 🛠⚛️📲

[![CI Status](https://img.shields.io/travis/MaxDesiatov/Tokamak/master.svg?style=flat)](https://travis-ci.org/MaxDesiatov/Tokamak)
[![Build Status](https://dev.azure.com/max0484/max/_apis/build/status/MaxDesiatov.Tokamak?branchName=master)](https://dev.azure.com/max0484/max/_build/latest?definitionId=3&branchName=master)
[![Coverage](https://img.shields.io/codecov/c/github/MaxDesiatov/Tokamak/master.svg?style=flat)](https://codecov.io/gh/maxdesiatov/Tokamak)
[![Version](https://img.shields.io/cocoapods/v/Tokamak.svg?style=flat)](https://cocoapods.org/pods/Tokamak)
[![License](https://img.shields.io/cocoapods/l/Tokamak.svg?style=flat)](https://cocoapods.org/pods/Tokamak)
Expand Down
21 changes: 21 additions & 0 deletions azure-pipelines.yml
@@ -0,0 +1,21 @@
trigger:
- master

jobs:
- job: lint
pool:
vmImage: "macos-latest"
steps:
- bash: ./lint.sh

- job: test
pool:
vmImage: "macos-latest"
steps:
- bash: ./test.sh
env:
IOS_DEVICE: "platform=iOS Simulator,OS=12.2,name=iPhone SE"
- bash: ./codecov.sh
env:
CODECOV_TOKEN: $(codecovToken)
condition: succeeded()
6 changes: 6 additions & 0 deletions codecov.sh
@@ -0,0 +1,6 @@
#!/bin/bash

set -e
set -o pipefail

bash <(curl -s https://codecov.io/bash)
10 changes: 10 additions & 0 deletions lint.sh
@@ -0,0 +1,10 @@
#!/bin/bash

set -e
set -o pipefail

brew update
brew install swiftformat swiftlint

swiftformat --lint --verbose .
swiftlint
10 changes: 10 additions & 0 deletions test.sh
@@ -0,0 +1,10 @@
#!/bin/bash

swift package generate-xcodeproj --xcconfig-overrides Package.xcconfig
git checkout HEAD Tokamak.xcodeproj/xcshareddata/xcschemes/TokamakCLI.xcscheme
set -o pipefail && xcodebuild -scheme TokamakUIKit -sdk iphonesimulator | xcpretty
set -o pipefail && xcodebuild -scheme TokamakAppKit -sdk macosx | xcpretty
# this runs the build the second time, but it's the only way to make sure
# that `Package.swift` is in a good state
swift build --target Tokamak
set -o pipefail && xcodebuild test -enableCodeCoverage YES -scheme Tokamak | xcpretty

0 comments on commit bd70003

Please sign in to comment.