Skip to content

Commit

Permalink
Merge pull request #5 from mxcl/no-warnings
Browse files Browse the repository at this point in the history
No warnings
  • Loading branch information
mxcl authored Jun 7, 2020
2 parents 34a01a0 + 6e84f6c commit ce5c54a
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
path: .build
key: macOS-${{ matrix.xcode }}
restore-keys: macOS-
- run: swift test
- run: swift test --parallel -Xswiftc -warnings-as-errors
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app
linux:
Expand All @@ -54,7 +54,7 @@ jobs:
key: swift-${{ matrix.swift }}
restore-keys: swift-
- uses: YOCKOW/Action-setup-swift@master
# if: ${{ matrix.swift != '5.2.4' }}
if: ${{ matrix.swift != '5.2.4' }}
with:
swift-version: ${{ matrix.swift }}
- run: swift test
- run: swift test --parallel -Xswiftc -warnings-as-errors
39 changes: 39 additions & 0 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI
on:
push:
branches:
- master
jobs:
macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: .build
key: macOS-
restore-keys: macOS-
- run: swift build
env:
DEVELOPER_DIR: /Applications/Xcode_11.5.app
linux:
runs-on: ubuntu-latest
strategy:
matrix:
swift:
- 4.2.1
- 5.0.3
- 5.1.4
- 5.2.4
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: .build
key: swift-${{ matrix.swift }}
restore-keys: swift-
- uses: YOCKOW/Action-setup-swift@master
if: ${{ matrix.swift != '5.2.4' }}
with:
swift-version: ${{ matrix.swift }}
- run: swift build
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
include:
- name: macOS / Swift 4.0.3 (Xcode 10.1)
stage: test
script: swift test --parallel -Xswiftc -swift-version -Xswiftc 4
script: swift test --parallel -Xswiftc -swift-version -Xswiftc 4 -Xswiftc -warnings-as-errors

- name: macOS / Swift 4.2.1 (Xcode 10.1)
script: swift test --parallel
script: swift test --parallel -Xswiftc -warnings-as-errors

- name: macOS / Swift 5.0.1 (Xcode 10.2)
script: swift test --parallel
script: swift test --parallel -Xswiftc -warnings-as-errors
3 changes: 2 additions & 1 deletion Sources/LegibleError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ extension Error {

private var errorType: ErrorType {
#if os(Linux)
let isNSError = self is NSError
// without the `as Any` noop this generates an (incorrect) warning
let isNSError = self as Any is NSError
#else
let foo: Any = self
let nativeClassNames = ["_SwiftNativeNSError", "__SwiftNativeNSError"]
Expand Down

0 comments on commit ce5c54a

Please sign in to comment.