2023-11-18 16:38:34 -06:00
|
|
|
name: Test & Docs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-01-29 12:36:05 -06:00
|
|
|
branches: [master]
|
2023-11-18 16:38:34 -06:00
|
|
|
pull_request:
|
2024-01-29 12:36:05 -06:00
|
|
|
branches: [master]
|
2023-11-18 16:38:34 -06:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
timeout-minutes: 60
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: postgis/postgis:12-2.5
|
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
env:
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
POSTGRES_DB: postgres
|
|
|
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-01-29 12:36:05 -06:00
|
|
|
python-version: ['3.10', '3.12']
|
2023-11-18 16:38:34 -06:00
|
|
|
database: [postgresql]
|
|
|
|
|
|
|
|
steps:
|
2024-01-29 12:36:05 -06:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
cache: 'pip'
|
|
|
|
cache-dependency-path: '**/pyproject.toml'
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install libgdal-dev
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
make develop installjs vendors
|
|
|
|
- name: run tests
|
|
|
|
run: make test
|
|
|
|
env:
|
|
|
|
DJANGO_SETTINGS_MODULE: 'umap.tests.settings'
|
|
|
|
UMAP_SETTINGS: 'umap/tests/settings.py'
|
2023-11-18 16:38:34 -06:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-01-29 12:36:05 -06:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python3 -m pip install -e .[test,dev]
|
2024-01-29 13:13:03 -06:00
|
|
|
make installjs
|
2024-01-29 12:36:05 -06:00
|
|
|
|
|
|
|
- name: Run Lint
|
|
|
|
run: make lint
|
2023-11-18 16:38:34 -06:00
|
|
|
|
2024-01-29 12:36:05 -06:00
|
|
|
- name: Run Docs
|
|
|
|
run: make docs
|
2023-12-06 04:54:25 -06:00
|
|
|
|
|
|
|
docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-01-29 12:36:05 -06:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python3 -m pip install -r docs/requirements.txt
|
2023-12-06 04:54:25 -06:00
|
|
|
|
2024-01-29 12:36:05 -06:00
|
|
|
- name: Run Docs
|
|
|
|
run: mkdocs build
|