Modify github actions for postgres #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Postgres | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Generate SSL Certificates | |
run: | | |
mkdir -p /etc/ssl/certs /etc/ssl/private | |
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ | |
-keyout /etc/ssl/private/ssl-cert-snakeoil.key \ | |
-out /etc/ssl/certs/ssl-cert-snakeoil.pem \ | |
-subj "/CN=localhost" | |
- name: Pull Postgres Image | |
run: docker pull postgres:14 | |
- name: Start Test Environment | |
run: | | |
docker-compose -f docker-compose.test.yml up --build --abort-on-container-exit | |
- name: Debug Postgres Version | |
run: | | |
docker exec $(docker ps -q -f "name=db") psql --version |