-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ubuntu &/ windows test workflow (#76)
* Add ubuntu test workflow * Fix spacing * Fix spacing * Update ubuntu.yml * Create windows.yml * Update Application.swift to run on other platforms * Improve multiplatform * Improve multiplatform * Improve logging multiplatform support * Prefer limitting watchOS only * Improve multiplatform * Improve multiplatform support * Improve multiplatform support * Improve multiplatform support * Fix ApplicationLogger * Remove KeychainTests for Linux and Windows * Change CGColor to String hex for tests * Improve logging emoji for non-Apple platforms
- Loading branch information
Showing
25 changed files
with
284 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# This workflow will build a Swift project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift | ||
|
||
name: Ubuntu | ||
|
||
on: | ||
push: | ||
branches: ["**"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: swift-actions/setup-swift@v1 | ||
- uses: actions/checkout@v3 | ||
- name: Build for release | ||
run: swift build -v -c release | ||
- name: Test | ||
run: swift test -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Windows | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: compnerd/gha-setup-swift@main | ||
with: | ||
branch: swift-5.9.2-release | ||
tag: 5.9.2-RELEASE | ||
|
||
- uses: actions/checkout@v2 | ||
- run: swift build | ||
- run: swift test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
Sources/AppState/Application/Types/Helper/ApplicationLogger.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#if os(Linux) || os(Windows) | ||
open class ApplicationLogger { | ||
open func debug( | ||
_ message: String, | ||
_ fileID: StaticString = #fileID, | ||
_ function: StaticString = #function, | ||
_ line: Int = #line, | ||
_ column: Int = #column | ||
) { | ||
debug( | ||
{ message }, | ||
fileID, | ||
function, | ||
line, | ||
column | ||
) | ||
} | ||
|
||
open func debug( | ||
_ message: () -> String, | ||
_ fileID: StaticString = #fileID, | ||
_ function: StaticString = #function, | ||
_ line: Int = #line, | ||
_ column: Int = #column | ||
) { | ||
Application.log( | ||
debug: message, | ||
fileID: fileID, | ||
function: function, | ||
line: line, | ||
column: column | ||
) | ||
} | ||
|
||
open func error( | ||
_ error: Error, | ||
message: String, | ||
_ fileID: StaticString = #fileID, | ||
_ function: StaticString = #function, | ||
_ line: Int = #line, | ||
_ column: Int = #column | ||
) { | ||
Application.log( | ||
error: error, | ||
message: message, | ||
fileID: fileID, | ||
function: function, | ||
line: line, | ||
column: column | ||
) | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
Sources/AppState/PropertyWrappers/Dependency/AppDependency.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
Sources/AppState/PropertyWrappers/Slice/OptionalConstant.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.