Skip to content

docs: Update README.md #129

docs: Update README.md

docs: Update README.md #129

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
container:
image: python:3.10
services:
postgres:
image: postgis/postgis:latest
env:
POSTGRES_DB: terra
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
env:
DB_HOST: postgres
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
DB_NAME: terra
RQ_REDIS_URL: redis://redis:6379/0
SECRET_KEY: enter-secret-key
TILES_BUCKET: dym-platform-test-tiles
FILES_BUCKET: dym-platform-test-files
TASK_ARTIFACTS_BUCKET: dym-platform-test-task-artifacts
MODELS_BUCKET: dym-platform-test-models
ALLOWED_HOSTS: localhost,127.0.0.1
DEBUG: 1
steps:
- uses: actions/checkout@v2
- id: "auth"
uses: "google-github-actions/auth@v0"
with:
credentials_json: "${{ secrets.GCP_CREDENTIALS }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v0"
- name: "Use gcloud CLI"
run: "gcloud info"
- name: Install system dependencies
run: |
apt-get update && apt-get install -y --no-install-recommends \
binutils \
gdal-bin \
gettext \
libasound2 \
libgbm-dev \
libgconf-2-4 \
libgdal-dev \
libgtk-3-0 \
libgtk2.0-0 \
libnotify-dev \
libnss3 \
libproj-dev \
libspatialindex-dev \
libxss1 \
libxtst6 \
postgresql-client \
proj-bin \
python3-dev \
xauth \
xvfb
- name: Set up Poetry
run: |
pip3 install poetry
shell: bash
- name: Install Terra dependencies
run: |
cd terra/ && poetry install
- name: Run Terra tests and generate coverage report
run: |
cd terra/
poetry run coverage run manage.py test
poetry run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
root_dir: terra/