Skip to content

Commit

Permalink
f: parametrize postgres installations
Browse files Browse the repository at this point in the history
  • Loading branch information
fizyk committed Mar 17, 2021
1 parent 5ac2f32 commit 3d62053
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,22 @@ jobs:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, pypy3]
postgres-version: [9.5, 9.6, 10, 11, 12, 12]
env:
OS: ubuntu-latest
PYTHON: ${{ matrix.python-version }}
POSTGRES: ${{ matrix.postgres-version }}

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install postgresql
run: |
./scripts/setup-postgresql.sh
sudo apt install -y postgresql-${{ matrix.postgres-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
9 changes: 9 additions & 0 deletions scripts/install-postgresql.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
# Create the file repository configuration:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

# Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

# Update the package lists:
sudo apt-get update

0 comments on commit 3d62053

Please sign in to comment.