Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
237 changes: 201 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,216 @@ on:
- "Package.swift"
- "Source/**"
- "Tests/**"

jobs:
SwiftLint:
runs-on: ubuntu-latest
macOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- xcode: "Xcode_16.0"
runsOn: macOS-14
name: "macOS 14, Xcode 16.0, Swift 6.0"
- xcode: "Xcode_15.4"
runsOn: macOS-14
name: "macOS 14, Xcode 15.4, Swift 5.10"
- xcode: "Xcode_15.0"
runsOn: macos-13
name: "macOS 13, Xcode 15.0, Swift 5.9.0"
- xcode: "Xcode_14.3.1"
runsOn: macos-13
name: "macOS 13, Xcode 14.3.1, Swift 5.8.0"
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "NetworkLayer" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload test coverage reports to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
scheme_name: NetworkLayer
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

iOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=18.1,name=iPhone 16 Pro"
name: "iOS 18.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=18.0,name=iPhone 16 Pro"
name: "iOS 18.0"
xcode: "Xcode_16.0"
runsOn: macOS-14
- destination: "OS=17.5,name=iPhone 15 Pro"
name: "iOS 17.5"
xcode: "Xcode_15.4"
runsOn: macOS-14
- destination: "OS=17.0.1,name=iPhone 14 Pro"
name: "iOS 17.0.1"
xcode: "Xcode_15.0"
runsOn: macos-13
- destination: "OS=16.4,name=iPhone 14 Pro"
name: "iOS 16.4"
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "NetworkLayer" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload test coverage reports to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
scheme_name: NetworkLayer
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

tvOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=18.1,name=Apple TV"
name: "tvOS 18.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=18.0,name=Apple TV"
name: "tvOS 18.0"
xcode: "Xcode_16.0"
runsOn: macOS-14
- destination: "OS=17.5,name=Apple TV"
name: "tvOS 17.5"
xcode: "Xcode_15.4"
runsOn: macOS-14
- destination: "OS=17.0,name=Apple TV"
name: "tvOS 17.0"
xcode: "Xcode_15.0"
runsOn: macos-13
- destination: "OS=16.4,name=Apple TV"
name: "tvOS 16.4"
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v3
- name: GitHub Action for SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "NetworkLayer" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload test coverage report to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
args: --strict
env:
DIFF_BASE: ${{ github.base_ref }}
Latest:
name: Test Latest (iOS, macOS, tvOS, watchOS)
runs-on: macOS-12
scheme_name: NetworkLayer
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

watchOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer"
timeout-minutes: 10
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=16.1,name=iPhone 14 Pro"
name: "iOS"
scheme: "NetworkLayer"
sdk: iphonesimulator
- destination: "OS=16.1,name=Apple TV"
name: "tvOS"
scheme: "NetworkLayer"
sdk: appletvsimulator
- destination: "OS=9.1,name=Apple Watch Series 8 (45mm)"
name: "watchOS"
scheme: "NetworkLayer"
sdk: watchsimulator
- destination: "platform=macOS"
name: "macOS"
scheme: "NetworkLayer"
sdk: macosx
- destination: "OS=11.1,name=Apple Watch Series 10 (46mm)"
name: "watchOS 11.1"
xcode: "Xcode_16.1"
runsOn: macOS-14
- destination: "OS=11.0,name=Apple Watch Series 10 (46mm)"
name: "watchOS 11.0"
xcode: "Xcode_16.0"
runsOn: macOS-14
- destination: "OS=10.5,name=Apple Watch Series 9 (45mm)"
name: "watchOS 10.5"
xcode: "Xcode_15.4"
runsOn: macOS-14
- destination: "OS=10.0,name=Apple Watch Series 9 (45mm)"
name: "watchOS 10.0"
xcode: "Xcode_15.0"
runsOn: macos-13
- destination: "OS=9.4,name=Apple Watch Series 8 (45mm)"
name: "watchOS 9.4"
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "./${{ matrix.sdk }}.xcresult"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
run: xcodebuild test -scheme "NetworkLayer" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload test coverage reports to Codecov
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
with:
scheme_name: NetworkLayer
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: "./${{ matrix.sdk }}.xcresult"


spm:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
env:
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- name: "macOS 14, SPM 6.0.2 Test"
xcode: "Xcode_16.1"
runsOn: macOS-14
- name: "macOS 14, SPM 6.0.0 Test"
xcode: "Xcode_16.0"
runsOn: macOS-14
- name: "macOS 14, SPM 5.9.0 Test"
xcode: "Xcode_15.0"
runsOn: macos-14
- name: "macOS 13, SPM 5.8.1 Test"
xcode: "Xcode_14.3.1"
runsOn: macos-13
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: swift build -c release --target NetworkLayer

merge-test-reports:
needs: [iOS, macOS, watchOS, tvOS]
runs-on: macos-13
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: test_output
- run: xcrun xcresulttool merge test_output/**/*.xcresult --output-path test_output/final/final.xcresult
- name: Upload Merged Artifact
uses: actions/upload-artifact@v4
with:
name: MergedResult
path: test_output/final

discover-typos:
name: Discover Typos
runs-on: macOS-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
steps:
- uses: actions/checkout@v4
- name: Discover typos
run: |
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
python3 -m pip install --upgrade pip
python3 -m pip install codespell
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"
4 changes: 2 additions & 2 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: ruby setup
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.1.4
bundler-cache: true
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -28,4 +28,4 @@ jobs:

DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}

run: bundle exec danger --verbose
run: bundle exec danger --verbose
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
Package.resolved
5 changes: 4 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ excluded:
- Tests
- Package.swift
- Package@swift-5.7.swift
- Package@swift-5.8.swift
- Package@swift-5.9.swift
- Package@swift-5.10.swift
- .build

# Rules
Expand Down Expand Up @@ -130,4 +133,4 @@ nesting:
type_name:
max_length:
warning: 40
error: 50
error: 50
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
All notable changes to this project will be documented in this file.

#### 1.x Releases
- `1.1.x` Release Candidates - [1.1.0-rc.1](#110-rc1)
- `1.0.x` Releases - [1.0.0](#100)

## [1.1.0-rc.1](https://github.com/space-code/network-layer/releases/tag/1.1.0-rc.1)
Released on 2024-12-25.

#### Added
- Bump the Swift version to 6.0.
- Added in Pull Request [#3](https://github.com/space-code/network-layer/pull/3).

#### Fixed
- Fix the `inout` parameter in the `IAuthenticator` protocol
- Fixed in Pull Request [#2](https://github.com/space-code/network-layer/pull/2).
- Fix the package builiding.
- Fixed in Pull Request [#6](https://github.com/space-code/network-layer/pull-6).

## [1.0.0](https://github.com/space-code/network-layer/releases/tag/1.0.0)
Released on 2023-12-04.

Expand Down
32 changes: 0 additions & 32 deletions Package.resolved

This file was deleted.

8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.9
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -17,9 +17,9 @@ let package = Package(
.library(name: "NetworkLayerInterfaces", targets: ["NetworkLayerInterfaces"]),
],
dependencies: [
.package(url: "https://github.com/space-code/atomic", .upToNextMajor(from: "1.0.0")),
.package(url: "https://github.com/space-code/typhoon", .upToNextMajor(from: "1.0.0")),
.package(url: "https://github.com/WeTransfer/Mocker", .upToNextMajor(from: "3.0.1")),
.package(url: "https://github.com/space-code/atomic", exact: "1.1.0"),
.package(url: "https://github.com/space-code/typhoon", exact: "1.2.1"),
.package(url: "https://github.com/WeTransfer/Mocker", exact: "3.0.1"),
],
targets: [
.target(
Expand Down
Loading
Loading