Skip to content

Commit e9b1d5e

Browse files
authored
Merge pull request #448 from httpswift/gitHub-actions
Migrate to use Github Actions instead of CircleCI
2 parents abc4a02 + 7dc007b commit e9b1d5e

File tree

7 files changed

+90
-84
lines changed

7 files changed

+90
-84
lines changed

.circleci/config.yml

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

.github/workflows/danger.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Danger
2+
on:
3+
pull_request:
4+
branches:
5+
- stable
6+
7+
jobs:
8+
Danger:
9+
runs-on: macos-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Cache Bundle Dependencies
13+
uses: actions/cache@v1
14+
with:
15+
path: vendor/bundle
16+
key: 1-gems-{{ checksum "Gemfile.lock" }}
17+
restore-keys: 1-gems-
18+
- name: Set Ruby Version
19+
uses: actions/setup-ruby@v1
20+
with:
21+
ruby-version: 2.6
22+
- name: Install Ruby Dependencies
23+
run: |
24+
bundle config path vendor/bundle
25+
bundle check || bundle install
26+
env:
27+
BUNDLE_JOBS: 4
28+
BUNDLE_RETRY: 3
29+
- name: Running Danger
30+
run: bundle exec danger
31+
env:
32+
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}

.github/workflows/linux-tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Test Linux Platform
2+
on:
3+
pull_request:
4+
branches:
5+
- stable
6+
7+
jobs:
8+
Test-Linux-Platform:
9+
runs-on: ubuntu-latest
10+
container:
11+
image: swift:5.2
12+
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --security-opt apparmor=unconfined
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Run Unit Tests
16+
run: swift test

.github/workflows/macos-tests.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test OS X Platform
2+
on:
3+
pull_request:
4+
branches:
5+
- stable
6+
7+
jobs:
8+
Test-OS-X-Platform:
9+
runs-on: macos-latest
10+
env:
11+
TEST_REPORTS: /tmp/test-results
12+
LANG: en_US.UTF-8
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Create Test Result Directory
17+
run: |
18+
mkdir -p tmp/test-results/
19+
- name: Run Unit Test - macOS
20+
run: |
21+
cd XCode
22+
set -o pipefail && xcodebuild test -scheme SwifterMac -sdk macosx -destination "arch=x86_64" | xcpretty -c -r html --output $TEST_REPORTS/macOS.html
23+
- name: Run Unit Test - iOS
24+
run: |
25+
cd XCode
26+
set -o pipefail && xcodebuild test -scheme SwifteriOS -sdk iphonesimulator -destination "name=iPhone 8" | xcpretty -c -r html --output $TEST_REPORTS/iOS.html
27+
- name: Run Unit Test - tvOS
28+
run: |
29+
cd XCode
30+
set -o pipefail && xcodebuild test -scheme SwiftertvOS -sdk appletvsimulator -destination "name=Apple TV 4K (at 1080p)" | xcpretty -c -r html --output $TEST_REPORTS/tvOS.html
31+
- name: Run Unit Test - Swift Package Manager
32+
run: |
33+
cd XCode
34+
swift build && swift test
35+
- name: Archive Test results
36+
uses: actions/upload-artifact@v1
37+
with:
38+
name: test-results
39+
path: tmp/test-results

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ All notable changes to this project will be documented in this file. Changes not
3232
- Use `swift_version` CocoaPods DSL. ([#425](https://github.com/httpswift/swifter/pull/425)) by [@dnkoutso](https://github.com/dnkoutso)
3333
- Fix compiler warnings in Socket+File.swift for iOS, tvOS, and Linux platforms by using `withUnsafeBytes` rather than `&` to get a scoped UnsafeRawPointer ([#445](https://github.com/httpswift/swifter/pull/445)) by [@kbongort](https://github.com/kbongort).
3434
- Fix tests on linux by importing FoundationNetworking for NSURLSession APIs. ([#446](https://github.com/httpswift/swifter/pull/446)) by [@kbongort](https://github.com/kbongort)
35+
- Replace CircleCI for continuous integration in favor of Github Actions. ([#446](https://github.com/httpswift/swifter/pull/446)) by [@Vkt0r](https://github.com/Vkt0r)
3536

3637
# [1.4.7]
3738

XCode/Tests/ServerThreadingTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ServerThreadingTests: XCTestCase {
2929
super.tearDown()
3030
}
3131

32-
func testShouldHandleTheSameRequestWithDifferentTimeIntervals() {
32+
func testShouldHandleTheRequestInDifferentTimeIntervals() {
3333

3434
let path = "/a/:b/c"
3535
let queue = DispatchQueue(label: "com.swifter.threading")

XCode/Tests/XCTestManifests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ extension ServerThreadingTests {
2727
// `swift test --generate-linuxmain`
2828
// to regenerate.
2929
static let __allTests__ServerThreadingTests = [
30+
("testShouldHandleTheRequestInDifferentTimeIntervals", testShouldHandleTheRequestInDifferentTimeIntervals),
3031
("testShouldHandleTheSameRequestConcurrently", testShouldHandleTheSameRequestConcurrently),
31-
("testShouldHandleTheSameRequestWithDifferentTimeIntervals", testShouldHandleTheSameRequestWithDifferentTimeIntervals),
3232
]
3333
}
3434

0 commit comments

Comments
 (0)