Skip to content

Commit 60bd928

Browse files
Use GitHub actions. (#290)
* Use GitHub actions. * GH fix Co-authored-by: Stephen Celis <[email protected]>
1 parent 295b799 commit 60bd928

File tree

6 files changed

+30
-57
lines changed

6 files changed

+30
-57
lines changed

.circleci/config.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: MacOS
8+
runs-on: macOS-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: Run tests
12+
run: make test-swift
13+
14+
ubuntu:
15+
name: Ubuntu
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Run tests
20+
run: make test-linux

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# 📸 SnapshotTesting
22

3-
[![Swift 5.1](https://img.shields.io/badge/swift-5.1-ED523F.svg?style=flat)](https://swift.org/download/) [![iOS/macOS/tvOS CI](https://img.shields.io/circleci/project/github/pointfreeco/swift-snapshot-testing/master.svg?label=ios/macos/tvos)](https://circleci.com/gh/pointfreeco/swift-snapshot-testing) [![Linux CI](https://img.shields.io/travis/pointfreeco/swift-snapshot-testing/master.svg?label=linux)](https://travis-ci.org/pointfreeco/swift-snapshot-testing) [![@pointfreeco](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/pointfreeco)
3+
[![Swift 5.1](https://img.shields.io/badge/swift-5.1-ED523F.svg?style=flat)](https://swift.org/download/)
4+
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fpointfreeco%2Fswift-snapshot-testing%2Fbadge&style=flat)](https://actions-badge.atrox.dev/pointfreeco/swift-snapshot-testing/goto)
5+
[![@pointfreeco](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/pointfreeco)
46

57
Delightful Swift snapshot testing.
68

Tests/SnapshotTestingTests/SnapshotTestingTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ final class SnapshotTestingTests: XCTestCase {
148148
func testMixedViews() {
149149
// #if os(iOS) || os(macOS)
150150
// // NB: CircleCI crashes while trying to instantiate SKView.
151-
// if !ProcessInfo.processInfo.environment.keys.contains("CIRCLECI") {
151+
// if !ProcessInfo.processInfo.environment.keys.contains("GITHUB_WORKFLOW") {
152152
// let webView = WKWebView(frame: .init(x: 0, y: 0, width: 50, height: 50))
153153
// webView.loadHTMLString("🌎", baseURL: nil)
154154
//
@@ -186,7 +186,7 @@ final class SnapshotTestingTests: XCTestCase {
186186
button.bezelStyle = .rounded
187187
button.title = "Push Me"
188188
button.sizeToFit()
189-
if !ProcessInfo.processInfo.environment.keys.contains("CIRCLECI") {
189+
if !ProcessInfo.processInfo.environment.keys.contains("GITHUB_WORKFLOW") {
190190
assertSnapshot(matching: button, as: .image)
191191
assertSnapshot(matching: button, as: .recursiveDescription)
192192
}
@@ -200,7 +200,7 @@ final class SnapshotTestingTests: XCTestCase {
200200
view.wantsLayer = true
201201
view.layer?.backgroundColor = NSColor.green.cgColor
202202
view.layer?.cornerRadius = 5
203-
if !ProcessInfo.processInfo.environment.keys.contains("CIRCLECI") {
203+
if !ProcessInfo.processInfo.environment.keys.contains("GITHUB_WORKFLOW") {
204204
assertSnapshot(matching: view, as: .image)
205205
assertSnapshot(matching: view, as: .recursiveDescription)
206206
}
@@ -224,7 +224,7 @@ final class SnapshotTestingTests: XCTestCase {
224224
label.isBezeled = false
225225
label.isEditable = false
226226
#endif
227-
if !ProcessInfo.processInfo.environment.keys.contains("CIRCLECI") {
227+
if !ProcessInfo.processInfo.environment.keys.contains("GITHUB_WORKFLOW") {
228228
label.text = "Hello."
229229
assertSnapshot(matching: label, as: .image(precision: 0.9), named: platform)
230230
label.text = "Hello"
@@ -236,7 +236,7 @@ final class SnapshotTestingTests: XCTestCase {
236236
func testSCNView() {
237237
// #if os(iOS) || os(macOS) || os(tvOS)
238238
// // NB: CircleCI crashes while trying to instantiate SCNView.
239-
// if !ProcessInfo.processInfo.environment.keys.contains("CIRCLECI") {
239+
// if !ProcessInfo.processInfo.environment.keys.contains("GITHUB_WORKFLOW") {
240240
// let scene = SCNScene()
241241
//
242242
// let sphereGeometry = SCNSphere(radius: 3)
@@ -273,7 +273,7 @@ final class SnapshotTestingTests: XCTestCase {
273273
func testSKView() {
274274
// #if os(iOS) || os(macOS) || os(tvOS)
275275
// // NB: CircleCI crashes while trying to instantiate SKView.
276-
// if !ProcessInfo.processInfo.environment.keys.contains("CIRCLECI") {
276+
// if !ProcessInfo.processInfo.environment.keys.contains("GITHUB_WORKFLOW") {
277277
// let scene = SKScene(size: .init(width: 50, height: 50))
278278
// let node = SKShapeNode(circleOfRadius: 15)
279279
// node.fillColor = .red
@@ -775,7 +775,7 @@ final class SnapshotTestingTests: XCTestCase {
775775
let html = try String(contentsOf: fixtureUrl)
776776
let webView = WKWebView()
777777
webView.loadHTMLString(html, baseURL: nil)
778-
if !ProcessInfo.processInfo.environment.keys.contains("CIRCLECI") {
778+
if !ProcessInfo.processInfo.environment.keys.contains("GITHUB_WORKFLOW") {
779779
assertSnapshot(
780780
matching: webView,
781781
as: .image(size: .init(width: 800, height: 600)),

0 commit comments

Comments
 (0)