File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change 67
67
sudo apt-get update
68
68
sudo apt-get install -y gcc-aarch64-linux-gnu
69
69
70
- # running containers via `services` only works on linux
71
- # https://github.com/actions/runner/issues/1866
72
- - name : 🐘 Setup postgres
70
+ # For Linux, use custom Docker image with plpgsql_check
71
+ - name : Build and start PostgreSQL with plpgsql_check
72
+ if : runner.os == 'Linux'
73
+ run : |
74
+ docker build -t postgres-plpgsql-check:latest .
75
+ docker run -d --name postgres \
76
+ -e POSTGRES_USER=postgres \
77
+ -e POSTGRES_PASSWORD=postgres \
78
+ -e POSTGRES_DB=postgres \
79
+ -p 5432:5432 \
80
+ postgres-plpgsql-check:latest
81
+ # Wait for postgres to be ready
82
+ for _ in {1..30}; do
83
+ if docker exec postgres pg_isready -U postgres; then
84
+ break
85
+ fi
86
+ sleep 1
87
+ done
88
+
89
+ # For Windows, use the action since PostgreSQL Docker image doesn't support Windows containers
90
+ - name : Setup postgres (Windows)
91
+ if : runner.os == 'Windows'
92
+ id : postgres
73
93
uses : ikalnytskyi/action-setup-postgres@v7
74
94
75
95
- name : 🧪 Run Tests
You can’t perform that action at this time.
0 commit comments