Skip to content

Commit

Permalink
Update workflow to create test database
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Feb 12, 2024
1 parent ef71767 commit 8f8defb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,39 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Cache sample files
id: cache-samples
uses: actions/cache@v4
with:
path: .config/sdss
key: ${{ runner.os }}-config-sdss

- name: Install Postgresql
uses: ikalnytskyi/action-setup-postgres@v5

- name: Install Q3C
run: |
wget https://github.com/segasai/q3c/archive/refs/tags/v2.0.1.tar.gz
tar xvf v2.0.1.tar.gz
cd q3c-2.0.1
make
make install
- name: Create database
run: |
createdb sdss5db_too_test
psql -c "CREATE EXTENSION q3c;" -d sdss5db_too_test
- name: Install dependencies
run: |
pip install --upgrade wheel pip setuptools
pip install .
- name: Populate database
run: |
cd tests/scripts
python create_test_database.py
- name: Lint with ruff
run: |
pip install ruff
Expand Down
1 change: 0 additions & 1 deletion tests/scripts/create_test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def create_test_database(
user: str | None = None,
host: str | None = None,
port: int | None = None,
confirm: bool = True,
):
"""Recreates a simple copy of ``catalogdb`` for testing.
Expand Down

0 comments on commit 8f8defb

Please sign in to comment.