Skip to content

Commit

Permalink
Go back to circleci (#37)
Browse files Browse the repository at this point in the history
* Revert "Add buddybuild to take care of ios and macOS tests (#35)"

This reverts commit d9e4781.

* coments

* boop

* better make file

* wip

* wip

* test

* wip

* wip

* wip

* blha
  • Loading branch information
mbrandonw committed Nov 28, 2017
1 parent d9e4781 commit c510e7d
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 12 deletions.
35 changes: 35 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,35 @@
version: 2

jobs:
build:
macos:
xcode: "9.0"

steps:
- checkout

- run:
name: Mac Info
command: system_profiler SPSoftwareDataType

- run:
name: Generate Xcode project file
command: swift package generate-xcodeproj

- run:
name: Run iOS tests
command: make test-ios
environment:
SNAPSHOT_ARTIFACTS: $CIRCLE_ARTIFACTS

- run:
name: Run macOS tests
command: make test-macos
environment:
SNAPSHOT_ARTIFACTS: $CIRCLE_ARTIFACTS

- run:
name: Run Swift tests
command: make test-swift
environment:
SNAPSHOT_ARTIFACTS: $CIRCLE_ARTIFACTS
1 change: 1 addition & 0 deletions .travis.yml
@@ -1,5 +1,6 @@
os:
- linux
# - osx
env:
language: generic
sudo: required
Expand Down
24 changes: 22 additions & 2 deletions Makefile
@@ -1,2 +1,22 @@
test:
docker build --tag snapshot-testing . && docker run --rm snapshot-testing
test-linux:
docker build --tag snapshot-testing . \
&& docker run --rm snapshot-testing

test-macos:
set -o pipefail && \
xcodebuild test \
-scheme SnapshotTesting-Package \
-destination platform="macOS" \
| xcpretty

test-ios:
set -o pipefail && \
xcodebuild test \
-scheme SnapshotTesting-Package \
-destination platform="iOS Simulator,name=iPhone 8,OS=11.0" \
| xcpretty

test-swift:
swift test

test-all: test-linux test-mac test-ios
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
# swift-snapshot-testing

macOS [![BuddyBuild](https://dashboard.buddybuild.com/api/statusImage?appID=5a0ce91b0283530001c83899&branch=master&build=latest)](https://dashboard.buddybuild.com/apps/5a0ce91b0283530001c83899/build/latest?branch=master) Linux [![Build Status](https://travis-ci.org/pointfreeco/swift-snapshot-testing.svg)](https://travis-ci.org/pointfreeco/swift-snapshot-testing)
macOS [![CircleCI](https://circleci.com/gh/pointfreeco/swift-snapshot-testing.svg?style=svg)](https://circleci.com/gh/pointfreeco/swift-snapshot-testing) Linux [![Build Status](https://travis-ci.org/pointfreeco/swift-snapshot-testing.svg)](https://travis-ci.org/pointfreeco/swift-snapshot-testing)

Automatically record app data into test assertions. Snapshot tests capture the entirety of a data structure and cover far more surface area than a typical unit test.

Expand Down
6 changes: 4 additions & 2 deletions Tests/SnapshotTestingTests/SnapshotTestingTests.swift
Expand Up @@ -50,7 +50,7 @@ class SnapshotTestingTests: XCTestCase {
}

#if os(iOS) || os(macOS)
@available(iOS 11.0, macOS 10.13, *)
// @available(iOS 11.0, macOS 10.13, *)
func testWebView() throws {
let fixtureUrl = URL(fileURLWithPath: String(#file))
.deletingLastPathComponent()
Expand All @@ -59,7 +59,9 @@ class SnapshotTestingTests: XCTestCase {

let webView = WKWebView()
webView.loadHTMLString(html, baseURL: nil)
assertSnapshot(matching: webView, named: platform)
if #available(macOS 10.13, *) {
assertSnapshot(matching: webView, named: platform)
}
}
#endif
}
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions buddybuild_postbuild.sh

This file was deleted.

3 changes: 0 additions & 3 deletions buddybuild_postclone.sh

This file was deleted.

0 comments on commit c510e7d

Please sign in to comment.