Skip to content

refactor: update deployment chart #538

refactor: update deployment chart

refactor: update deployment chart #538

Workflow file for this run

name: CI
on: [push]
env:
COMPOSE_DOCKER_CLI_BUILD: 1
DJANGO_DEBUG: true
DJANGO_EMAIL_BACKEND: "${{ secrets.DJANGO_EMAIL_BACKEND }}"
DJANGO_GCP_STORAGE_BUCKET_NAME: "${{ secrets.DJANGO_GCP_STORAGE_BUCKET_NAME }}"
DJANGO_SECRET_KEY: "${{ secrets.DJANGO_SECRET_KEY }}"
DOCKER_BUILDKIT: 1 # Enable Buildkit and let compose use it to speed up image building
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GOOGLE_ANALYTICS_ID: "${{ secrets.GOOGLE_ANALYTICS_ID }}"
GOOGLE_APPLICATION_CREDENTIALS: "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}"
GOOGLE_CLOUD_PROJECT: "${{ secrets.GOOGLE_CLOUD_PROJECT }}"
POSTGRES_DB: postgres
POSTGRES_HOST: localhost
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
TEST_POSTGRES_DB: idr_server_test
TEST_POSTGRES_HOST: localhost
TEST_POSTGRES_PASSWORD: postgres
TEST_POSTGRES_PORT: 5432
TEST_POSTGRES_USER: postgres
USE_DOCKER: no
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.11"]
# Service containers to run with `container-job`
services:
postgres:
image: postgis/postgis:15-3.3
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_USER: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
# Run all pre-commit hooks on all the files.
# Getting only staged files can be tricky in case a new PR is opened
# since the action is run on a branch in detached head state
- name: Install and run pre-commit
uses: pre-commit/action@v3.0.0
- name: Install Requirements
run: |
sudo apt-get update
sudo apt-get install postgis gdal-bin libgdal-dev
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
npm ci
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v0
with:
credentials_json: "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}"
- name: Test with tox
run: tox -r