Added OSGEO4W path setups and OS agnostic URL joins #779
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
push: | |
branches: | |
- "main" | |
env: | |
# using a dummy secret key | |
DJANGO_CONFIGURATION: DevelopmentConfiguration | |
DJANGO_SETTINGS_MODULE: rdwatch.server.settings | |
RDWATCH_SECRET_KEY: ff07f533a59fed1349a4fc49941d02ff22514f6dbf6086a44ea0c0a8952e8644 | |
RDWATCH_POSTGRESQL_URI: postgresql://rdwatch:ff07f533a59fed1349a4fc49941d02ff22514f6dbf6086a44ea0c0a8952e8644@localhost:5432/rdwatch | |
RDWATCH_CELERY_BROKER_URL: amqp://localhost:5672/ | |
RDWATCH_REDIS_URI: redis://localhost:6379/rdwatch | |
RDWATCH_DJANGO_DEBUG: 0 | |
RDWATCH_MINIO_STORAGE_ACCESS_KEY: rdwatch | |
RDWATCH_MINIO_STORAGE_SECRET_KEY: ff07f533a59fed1349a4fc49941d02ff22514f6dbf6086a44ea0c0a8952e8644 | |
RDWATCH_STORAGE_BUCKET_NAME: rdwatch | |
RDWATCH_POSTGRESQL_SCORING_URI: postgresql://scoring:ff07f533a59fed1349a4fc49941d02ff22514f6dbf6086a44ea0c0a8952e8644@localhost:5433/scoring | |
# These values are required by the RD-WATCH Django app, | |
# so we use placeholder values here | |
RDWATCH_SMART_STAC_URL: http://example.com | |
RDWATCH_SMART_STAC_KEY: deadbeef | |
jobs: | |
lint-python: | |
name: Lint Python | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install pre-commit | |
run: pip install pre-commit | |
- name: Cache pre-commit hooks | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit/ | |
key: pre-commit-cache|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Run pre-commit checks | |
run: pre-commit run --all-files | |
lint-node: | |
strategy: | |
fail-fast: false | |
matrix: | |
linter: [eslint, stylelint, typescript] | |
name: Lint [${{ matrix.linter }}] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
cache-dependency-path: vue/package-lock.json | |
- name: Install packages | |
run: npm ci | |
working-directory: vue | |
- name: Run ${{ matrix.linter }} | |
run: npm run lint:${{ matrix.linter }} | |
working-directory: vue | |
test-django: | |
name: Test Django [${{ matrix.tox-env }}] | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
tox-env: [test, check-migrations] | |
services: | |
postgres: | |
image: postgis/postgis:latest | |
env: | |
POSTGRES_DB: rdwatch | |
POSTGRES_USER: rdwatch | |
POSTGRES_PASSWORD: ${{ env.RDWATCH_SECRET_KEY }} | |
ports: | |
- 5432:5432 | |
scoredb: | |
image: postgis/postgis:latest | |
env: | |
POSTGRES_DB: scoring | |
POSTGRES_USER: scoring | |
POSTGRES_PASSWORD: ${{ env.RDWATCH_SECRET_KEY }} | |
ports: | |
- 5433:5432 | |
rabbitmq: | |
image: rabbitmq:latest | |
ports: | |
- 5672:5672 | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
minio: | |
# This image does not require any command arguments (which GitHub Actions don't support) | |
image: bitnami/minio:latest | |
env: | |
MINIO_ROOT_USER: minioAccessKey | |
MINIO_ROOT_PASSWORD: minioSecretKey | |
ports: | |
- 9000:9000 | |
steps: | |
- name: Install system dependencies | |
run: apt-fast install --no-install-recommends --yes | |
libgdal30 | |
libproj22 | |
python3-cachecontrol | |
python3-dev | |
python3-poetry | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install tox | |
run: pip install tox | |
- name: Run tests | |
run: tox -e ${{ matrix.tox-env }} | |
working-directory: django | |
test-vue: | |
name: Test [vue] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: npm | |
cache-dependency-path: vue/package-lock.json | |
- name: Install packages | |
run: npm ci | |
working-directory: vue | |
- name: Run tests | |
run: npm run test | |
working-directory: vue |