Skip to content

Commit

Permalink
Docker-less Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Mar 1, 2020
1 parent 317752e commit aa33c80
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 149 deletions.
30 changes: 0 additions & 30 deletions .build/build-docker.sh

This file was deleted.

18 changes: 0 additions & 18 deletions .build/docker/Dockerfile

This file was deleted.

25 changes: 0 additions & 25 deletions .build/docker/initdb-npgsql.sh

This file was deleted.

57 changes: 0 additions & 57 deletions .build/docker/server.crt

This file was deleted.

15 changes: 0 additions & 15 deletions .build/docker/server.key

This file was deleted.

20 changes: 16 additions & 4 deletions .github/workflows/build.yml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -31,8 +31,20 @@ jobs:
- name: Start PostgreSQL ${{ matrix.pg_major }} (Linux) - name: Start PostgreSQL ${{ matrix.pg_major }} (Linux)
if: startsWith(matrix.os, 'ubuntu') if: startsWith(matrix.os, 'ubuntu')
run: docker run --detach --name postgresql -p 5432:5432 npgsql/postgres:${{ matrix.pg_major }}-postgis-${{ env.postgis_version }} run: |
shell: bash wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update -qq
sudo apt-get install -qq postgresql-${{ matrix.pg_major }} postgresql-${{ matrix.pg_major }}-postgis-${{ env.postgis_version }}
sudo -u postgres psql -c "CREATE USER npgsql_tests SUPERUSER PASSWORD 'npgsql_tests'"
sudo -u postgres psql -c "CREATE DATABASE npgsql_tests OWNER npgsql_tests"
export PGDATA=/etc/postgresql/${{ matrix.pg_major }}/main
sudo sed -i 's/#ssl = off/ssl = on/' $PGDATA/postgresql.conf
sudo sed -i 's/#max_prepared_transactions = 0/max_prepared_transactions = 10/' $PGDATA/postgresql.conf
# Disable trust authentication, requiring MD5 passwords - some tests must fail if a password isn't provided.
sudo sh -c "echo 'host all all all md5' > $PGDATA/pg_hba.conf"
sudo pg_ctlcluster ${{ matrix.pg_major }} main restart
- name: Start PostgreSQL ${{ matrix.pg_major }} (Windows) - name: Start PostgreSQL ${{ matrix.pg_major }} (Windows)
if: startsWith(matrix.os, 'windows') if: startsWith(matrix.os, 'windows')
Expand All @@ -51,8 +63,8 @@ jobs:
unzip pgsql.zip -x 'pgsql/include/**' 'pgsql/doc/**' 'pgsql/pgAdmin 4/**' 'pgsql/StackBuilder/**' unzip pgsql.zip -x 'pgsql/include/**' 'pgsql/doc/**' 'pgsql/pgAdmin 4/**' 'pgsql/StackBuilder/**'
# Match Npgsql CI Docker image and stash one level up # Match Npgsql CI Docker image and stash one level up
cp {$GITHUB_WORKSPACE/.build/docker,pgsql}/server.crt cp {$GITHUB_WORKSPACE/.build,pgsql}/server.crt
cp {$GITHUB_WORKSPACE/.build/docker,pgsql}/server.key cp {$GITHUB_WORKSPACE/.build,pgsql}/server.key
# Find OSGEO version number # Find OSGEO version number
OSGEO_VERSION=$(\ OSGEO_VERSION=$(\
Expand Down

0 comments on commit aa33c80

Please sign in to comment.