Skip to content

Commit

Permalink
Adding Actions for Child Packages (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion authored Aug 12, 2024
1 parent f18a0e7 commit 6b697a3
Show file tree
Hide file tree
Showing 117 changed files with 1,898 additions and 2,474 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/Ngrokit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files
with:
search-paths: ./Packages/Ngrokit/.build
fail-on-empty-output: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down Expand Up @@ -100,6 +101,7 @@ jobs:
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-spm
with:
search-paths: ./Packages/Ngrokit/.build
fail-on-empty-output: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/SublimationBonjour.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files
with:
search-paths: ./Packages/SublimationBonjour/.build
fail-on-empty-output: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down Expand Up @@ -100,6 +101,7 @@ jobs:
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-spm
with:
search-paths: ./Packages/SublimationBonjour/.build
fail-on-empty-output: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand All @@ -113,7 +115,7 @@ jobs:
run: ./scripts/lint.sh
if: startsWith(matrix.xcode,'/Applications/Xcode_16.0')
- name: Run iOS target tests
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -sdk "iphonesimulator" -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }} -sdk "iphonesimulator" -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-iOS
with:
Expand All @@ -127,7 +129,7 @@ jobs:
files: ${{ join(fromJSON(steps.coverage-files-iOS.outputs.files), ',') }}
flags: iOS,iOS${{ matrix.iOSVersion }},macOS,${{ env.XCODE_NAME }}
- name: Run watchOS target tests
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -sdk "watchsimulator" -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }} -sdk "watchsimulator" -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-watchOS
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/SublimationNgrok.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files
with:
search-paths: ./Packages/SublimationNgrok/.build
fail-on-empty-output: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down Expand Up @@ -100,6 +101,7 @@ jobs:
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-spm
with:
search-paths: ./Packages/SublimationNgrok/.build
fail-on-empty-output: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand All @@ -113,7 +115,7 @@ jobs:
run: ./scripts/lint.sh
if: startsWith(matrix.xcode,'/Applications/Xcode_16.0')
- name: Run iOS target tests
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -sdk "iphonesimulator" -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }} -sdk "iphonesimulator" -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-iOS
with:
Expand All @@ -127,7 +129,7 @@ jobs:
files: ${{ join(fromJSON(steps.coverage-files-iOS.outputs.files), ',') }}
flags: iOS,iOS${{ matrix.iOSVersion }},macOS,${{ env.XCODE_NAME }}
- name: Run watchOS target tests
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -sdk "watchsimulator" -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }} -sdk "watchsimulator" -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-watchOS
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/SublimationService.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files
with:
search-paths: ./Packages/SublimationService/.build
fail-on-empty-output: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down Expand Up @@ -100,6 +101,7 @@ jobs:
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-spm
with:
search-paths: ./Packages/SublimationService/.build
fail-on-empty-output: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand All @@ -113,7 +115,7 @@ jobs:
run: ./scripts/lint.sh
if: startsWith(matrix.xcode,'/Applications/Xcode_16.0')
- name: Run iOS target tests
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -sdk "iphonesimulator" -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }} -sdk "iphonesimulator" -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-iOS
with:
Expand All @@ -127,7 +129,7 @@ jobs:
files: ${{ join(fromJSON(steps.coverage-files-iOS.outputs.files), ',') }}
flags: iOS,iOS${{ matrix.iOSVersion }},macOS,${{ env.XCODE_NAME }}
- name: Run watchOS target tests
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -sdk "watchsimulator" -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }} -sdk "watchsimulator" -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-watchOS
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/SublimationVapor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files
with:
search-paths: ./Packages/SublimationVapor/.build
fail-on-empty-output: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down Expand Up @@ -99,6 +100,7 @@ jobs:
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-spm
with:
search-paths: ./Packages/SublimationVapor/.build
fail-on-empty-output: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand All @@ -112,7 +114,7 @@ jobs:
run: ./scripts/lint.sh
if: startsWith(matrix.xcode,'/Applications/Xcode_16.0')
- name: Run iOS target tests
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -sdk "iphonesimulator" -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }} -sdk "iphonesimulator" -destination 'platform=iOS Simulator,name=${{ matrix.iPhoneName }},OS=${{ matrix.iOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-iOS
with:
Expand All @@ -126,7 +128,7 @@ jobs:
files: ${{ join(fromJSON(steps.coverage-files-iOS.outputs.files), ',') }}
flags: iOS,iOS${{ matrix.iOSVersion }},macOS,${{ env.XCODE_NAME }}
- name: Run watchOS target tests
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }}-Package -sdk "watchsimulator" -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
run: xcodebuild test -scheme ${{ env.PACKAGE_NAME }} -sdk "watchsimulator" -destination 'platform=watchOS Simulator,name=${{ matrix.watchName }},OS=${{ matrix.watchOSVersion }}' -enableCodeCoverage YES build test
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files-watchOS
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,5 @@ xcuserdata
!Demo/SublimationDemoApp.xcodeproj
.mint
# End of https://www.toptal.com/developers/gitignore/api/swift,swiftpm,swiftpackagemanager,xcode,macos

test_output.log
27 changes: 0 additions & 27 deletions Demo/SublimationDemoServer/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -36,33 +36,6 @@
"version" : "4.5.2"
}
},
{
"identity" : "prch",
"kind" : "remoteSourceControl",
"location" : "https://github.com/brightdigit/Prch.git",
"state" : {
"revision" : "600b49cc7a77271ea3d2a9f9e449be081562a087",
"version" : "0.2.1"
}
},
{
"identity" : "prchnio",
"kind" : "remoteSourceControl",
"location" : "https://github.com/brightdigit/PrchNIO.git",
"state" : {
"revision" : "337d0b2f77b0c4ad5b5b3bad6768a9ecd70b003c",
"version" : "0.2.0-beta.1"
}
},
{
"identity" : "prchvapor",
"kind" : "remoteSourceControl",
"location" : "https://github.com/brightdigit/PrchVapor.git",
"state" : {
"revision" : "8c19c645f9c2763014885e42a42096ae61da636b",
"version" : "0.2.0-beta.2"
}
},
{
"identity" : "routing-kit",
"kind" : "remoteSourceControl",
Expand Down
4 changes: 4 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ let package = Package(
.product(name: "Logging", package: "swift-log")
],
swiftSettings: swiftSettings
),
.testTarget(
name: "SublimationTests",
dependencies: ["Sublimation"]
)
]
)
Expand Down
12 changes: 11 additions & 1 deletion Packages/Ngrokit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ let package = Package(
.macCatalyst(.v17)
],
products: [
.library(name: "Ngrokit", targets: ["Ngrokit"])
.library(name: "Ngrokit", targets: ["Ngrokit"]),
.library(name: "NgrokitMocks", targets: ["NgrokitMocks"])
],
dependencies: [
.package(
Expand All @@ -60,6 +61,15 @@ let package = Package(
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime")
],
swiftSettings: swiftSettings
),
.target(
name: "NgrokitMocks",
dependencies: ["Ngrokit"],
swiftSettings: swiftSettings
),
.testTarget(
name: "NgrokitTests",
dependencies: ["Ngrokit", "NgrokitMocks"]
)
]
)
Expand Down
10 changes: 7 additions & 3 deletions Packages/Ngrokit/Scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ MINT_RUN="/opt/homebrew/bin/mint run $MINT_ARGS"
if [ -z "$SRCROOT" ]; then
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PACKAGE_DIR="${SCRIPT_DIR}/.."
PERIPHERY_OPTIONS="--skip-build"
else
PACKAGE_DIR="${SRCROOT}"
PERIPHERY_OPTIONS=""
else
PACKAGE_DIR="${SRCROOT}"
PERIPHERY_OPTIONS="--skip-build"
fi


Expand All @@ -32,6 +32,10 @@ fi

echo "LINT Mode is $LINT_MODE"

if [ "$LINT_MODE" == "INSTALL" ]; then
exit
fi

if [ -z "$CI" ]; then
$MINT_RUN swift-format format --recursive --parallel --in-place $PACKAGE_DIR/Sources
else
Expand Down
Loading

0 comments on commit 6b697a3

Please sign in to comment.