Feature/better stats (#65) #235
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 docker-compose database | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup certificates | |
run: | | |
cd database | |
echo -e "1\nn" | ./gen_certs.sh | |
echo -e "2\ncoffeebuddydb" | ./gen_certs.sh | |
echo -e "3\ncoffeebuddy01\nn" | ./gen_certs.sh | |
- name: Create container | |
run: | | |
cd database | |
docker-compose up | |
- name: Start container again | |
run: | | |
cd database | |
docker-compose up -d | |
sleep 5 | |
PGSSLMODE=require \ | |
PGSSLROOTCERT=certs/ca/root.crt \ | |
PGSSLCERT=certs/client_coffeebuddy01/postgresql.crt \ | |
PGSSLKEY=certs/client_coffeebuddy01/postgresql.key \ | |
psql -U coffeebuddy01 -h localhost -d coffeebuddy -lqt | |
- name: Stop containers | |
if: always() | |
run: | | |
cd database | |
docker-compose down |