mirror of
https://github.com/softinio/Fishee.git
synced 2025-02-22 21:46:05 -08:00
Update gha
This commit is contained in:
parent
984cd30c29
commit
416b61611d
3 changed files with 8 additions and 5 deletions
4
.github/workflows/build-and-release.yml
vendored
4
.github/workflows/build-and-release.yml
vendored
|
@ -12,7 +12,7 @@ jobs:
|
||||||
arch: [x86_64, arm64]
|
arch: [x86_64, arm64]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Get swift version
|
- name: Get swift version
|
||||||
run: swift --version
|
run: swift --version
|
||||||
|
@ -33,7 +33,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Get swift version
|
- name: Get swift version
|
||||||
run: swift --version
|
run: swift --version
|
||||||
|
|
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
|
@ -16,10 +16,13 @@ jobs:
|
||||||
os: [macos-15, ubuntu-latest]
|
os: [macos-15, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Get swift version
|
- name: Get swift version
|
||||||
run: swift --version
|
run: swift --version
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: swift build -v
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: swift test
|
run: swift test -v
|
||||||
|
|
|
@ -102,7 +102,7 @@ func writeFishHistory(to path: String, history: [FishHistoryEntry], backup: Bool
|
||||||
///
|
///
|
||||||
/// - Returns: List of ``FishHistoryEntry`` entries from history file.
|
/// - Returns: List of ``FishHistoryEntry`` entries from history file.
|
||||||
func parseFishHistory(from filePath: String) -> [FishHistoryEntry]? {
|
func parseFishHistory(from filePath: String) -> [FishHistoryEntry]? {
|
||||||
guard let fileContents = try? String(contentsOfFile: filePath, encoding: String.Encoding.utf8) else {
|
guard let fileContents = try? String(contentsOfFile: filePath, encoding: .utf8) else {
|
||||||
print("Failed to open file.")
|
print("Failed to open file.")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue