Skip to content

Test and other fixes for the smgr branch #257

Test and other fixes for the smgr branch

Test and other fixes for the smgr branch #257

name: Build and Test Docker Image
on: [pull_request, workflow_dispatch]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Docker image
run: |
docker build -t perconalab/pg_tde:${{ github.sha }} -t pg_tde-test . -f docker/Dockerfile
- name: Run and test Docker image
run: |
docker run --name pg-tde -e POSTGRES_PASSWORD=mysecretpassword -d pg_tde-test
sleep 10
IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pg-tde)
echo $IP
echo "CREATE TABLE test_enc(id SERIAL, k INTEGER DEFAULT '0' NOT NULL, PRIMARY KEY (id)) USING pg_tde;" | docker run -e PGPASSWORD=mysecretpassword --rm postgres psql -h $IP -U postgres
echo "SELECT * FROM test_enc;" | docker run -e PGPASSWORD=mysecretpassword --rm postgres psql -h $IP -U postgres