一覧へ戻る
ankane/setup-postgres(新しいタブで開きます)
主要言語: JavaScript
The missing action for Postgres
- star 数
- 57
- watcher 数
- 2
- fork 数
- 10
- issue 数
- 4
- 最終更新
- 2026/09/07
主要言語: JavaScript
The missing action for Postgres
The missing action for Postgres 🎉
Add it as a step to your workflow
- uses: ankane/setup-postgres@v1
The default credentials are:
runner (the OS user) on Linux and Mac, postgres on Windowslocalhost or socket5432Specify a version
- uses: ankane/setup-postgres@v1 with: postgres-version: 18
Currently supports
| Version | 18 |
17 |
16 |
15 |
14 |
|---|---|---|---|---|---|
ubuntu-26.04 |
default | ✓ | ✓ | ✓ | ✓ |
ubuntu-26.04-arm |
default | ✓ | ✓ | ✓ | ✓ |
ubuntu-24.04 |
✓ | ✓ | default | ✓ | ✓ |
ubuntu-24.04-arm |
✓ | ✓ | default | ✓ | ✓ |
ubuntu-22.04 |
✓ | ✓ | ✓ | ✓ | default |
ubuntu-22.04-arm |
✓ | ✓ | ✓ | ✓ | default |
macos-26 |
default | ✓ | ✓ | ✓ | ✓ |
macos-15 |
default | ✓ | ✓ | ✓ | ✓ |
macos-15-intel |
default | ✓ | ✓ | ✓ | ✓ |
macos-14 |
default | ✓ | ✓ | ✓ | ✓ |
windows-2025 |
default | ||||
windows-2022 |
default |
Test against multiple versions
strategy: matrix: postgres-version: [18, 17, 16, 15, 14] steps: - uses: ankane/setup-postgres@v1 with: postgres-version: ${{ matrix.postgres-version }}
Create a database
- uses: ankane/setup-postgres@v1 with: database: testdb
Specify a user
- uses: ankane/setup-postgres@v1 with: user: testuser
Set postgresql.conf config
- uses: ankane/setup-postgres@v1 with: config: | shared_preload_libraries = 'pg_stat_statements'
Install development files (for building extensions)
- uses: ankane/setup-postgres@v1 with: dev-files: true
Run queries
- run: psql -d testdb -c 'SHOW server_version'
Everyone is encouraged to help improve this project. Here are a few ways you can help: