Skip to content

Commit be6f84f

Browse files
committed
wip: end to end tests in github actions
1 parent 403e0fe commit be6f84f

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

.github/workflows/pull_request.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,35 @@ jobs:
5151
run: |
5252
swift test
5353
54+
endtoend-tests:
55+
name: End to end tests
56+
runs-on: ubuntu-latest
57+
services:
58+
registry:
59+
image: registry:2
60+
ports:
61+
- 5000:5000
62+
container:
63+
image: swift:6.0-noble
64+
steps:
65+
- name: Checkout repository
66+
uses: actions/checkout@v4
67+
with:
68+
persist-credentials: false
69+
70+
- name: Mark the workspace as safe
71+
# https://github.com/actions/checkout/issues/766
72+
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
73+
74+
- name: Run test job
75+
run: |
76+
cd Examples/HelloWorldVapor
77+
swift package --allow-network-connections all \
78+
build-container-image \
79+
--allow-insecure-http destination \
80+
--repository registry:5000/vapor \
81+
--from swift:slim
82+
5483
swift-6-language-mode:
5584
name: Swift 6 Language Mode
5685
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main

Examples/HelloWorldVapor/Package.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ let package = Package(
2020
name: "hello-world",
2121
platforms: [.macOS(.v13)],
2222
dependencies: [
23-
.package(url: "https://github.com/vapor/vapor", .upToNextMajor(from: "4.102.0")),
24-
.package(url: "https://github.com/apple/swift-container-plugin", from: "0.2.0"),
23+
.package(url: "https://github.com/vapor/vapor", .upToNextMajor(from: "4.102.0")), .package(path: "../.."),
2524
],
2625
targets: [.executableTarget(name: "hello-world", dependencies: [.product(name: "Vapor", package: "vapor")])]
2726
)

0 commit comments

Comments
 (0)