Skip to content

Commit 17472d9

Browse files
committed
Add a launch check to the release build to catch #3755
1 parent e61b602 commit 17472d9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ jobs:
7474
with: { 'fetch-depth': 0 }
7575
- name: Build release
7676
run: swift build -c release --static-swift-stdlib -Xlinker -ljemalloc
77+
- name: Test launch
78+
run: |
79+
# Since we're only pinging the version api endpoint, no database is needed and
80+
# we can just copy the testing template to ensure the db env variables are set.
81+
cp .env.testing.template .env.testing
82+
# FIXME: change to `-c release` after testing!!!
83+
swift run -c debug Run serve --port 8080 &
84+
sleep 2
85+
[ "$(curl -sL -w "%{http_code}" -o /dev/null http://localhost:8080/api/version)" == "200" ] || echo Connection failed
7786
7887
# test-macos:
7988
# name: Test macOS

0 commit comments

Comments
 (0)