Skip to content

Commit 4824744

Browse files
Update swift.yml
1 parent 3b0002c commit 4824744

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

.github/workflows/swift.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,6 @@ jobs:
1010
build:
1111
runs-on: macos-latest
1212

13-
services:
14-
postgres:
15-
image: postgres:14
16-
env:
17-
POSTGRES_USER: vapor
18-
POSTGRES_PASSWORD: vapor
19-
POSTGRES_DB: vapor-comments
20-
ports:
21-
- 5432:5432
22-
options: >-
23-
--health-cmd pg_isready -U vapor
24-
--health-interval 10s
25-
--health-timeout 5s
26-
--health-retries 5
2713

2814
steps:
2915
- uses: SwiftyLab/setup-swift@latest
@@ -33,12 +19,11 @@ jobs:
3319
if: runner.os == 'macOS'
3420
run: xcrun --toolchain ${{ env.TOOLCHAINS }} swift --version
3521
- uses: actions/checkout@v4
36-
- name: Wait for PostgreSQL to be ready
22+
- name: Install PostgreSQL
3723
run: |
38-
until pg_isready -h localhost -p 5432 -U vapor; do
39-
echo "Waiting for PostgreSQL to be ready..."
40-
sleep 2
41-
done
24+
brew install postgresql@14
25+
brew services start postgresql@14
26+
createdb -U $(whoami) vapor-comments
4227
- name: Build
4328
run: sh build.sh
4429
- name: Run tests

0 commit comments

Comments
 (0)