Skip to content

Update create-fast-machine instructions #22211

Update create-fast-machine instructions

Update create-fast-machine instructions #22211

Workflow file for this run

name: 🔮 CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
DJANGO_SETTINGS_MODULE: config.settings.test
REDIS_URL: redis://127.0.0.1:6379
REQUIREMENTS_PATH: requirements/test.txt
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
services:
minio:
image: bitnami/minio
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- 9000:9000
redis:
image: redis
ports:
- 6379:6379
postgres:
# Docker Hub image
image: postgis/postgis:15-master
env:
POSTGRES_PASSWORD: password
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
steps:
- name: 🐘 Non-durable PostgreSQL
run: |
psql <<SQL
ALTER SYSTEM SET fsync=off;
ALTER SYSTEM SET synchronous_commit=off;
ALTER SYSTEM SET full_page_writes=off;
SQL
docker kill --signal=SIGHUP ${{ job.services.postgres.id }}
env:
PGPASSWORD: password
PGHOST: localhost
PGUSER: postgres
- uses: actions/checkout@v4.1.4
- name: 🌍 Install spatial libraries
run: sudo apt-get update && sudo apt-get install binutils build-essential libproj-dev gdal-bin
- name: 💾 Create a database to check migrations
run: |
psql <<SQL
CREATE DATABASE itou;
SQL
env:
PGPASSWORD: password
PGHOST: localhost
PGUSER: postgres
- name: 💂 Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: requirements/test.txt
- name: 📥 Install dependencies
run: |
make venv
echo ".venv/bin" >> $GITHUB_PATH
- name: ✨ Verify quality
run: make quality
- name: 🤹 Django tests
run: make test