Add ability to replay join records #1684
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: Run Django Tests | ||
on: | ||
pull_request: | ||
push: | ||
branches: [ main ] | ||
permissions: read-all | ||
jobs: | ||
run-django-tests: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: docker.io/postgres:15-bookworm | ||
env: | ||
POSTGRES_DB: nycmesh-dev | ||
POSTGRES_USER: nycmesh | ||
POSTGRES_PASSWORD: abcd1234 | ||
POSTGRES_PORT: 5432 | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
pelias: | ||
image: pelias/parser:latest | ||
ports: | ||
- 6800:3000 | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
minio: | ||
image: quay.io/minio/minio | ||
ports: | ||
- '9000:9000' | ||
- '9001:9001' | ||
#networks: | ||
# - api | ||
volumes: | ||
- 'minio_data:/data' | ||
command: | | ||
Check failure on line 46 in .github/workflows/run_django_tests.yaml GitHub Actions / Run Django TestsInvalid workflow file
|
||
server /data --console-address ":9001" | ||
environment: | ||
- MINIO_ROOT_USER=sampleaccesskey | ||
- MINIO_ROOT_PASSWORD=samplesecretkey | ||
- MINIO_DEFAULT_BUCKETS=meshdb-join-form-log | ||
# I hate computers: https://github.com/minio/minio/issues/4769 | ||
createbuckets: | ||
image: minio/mc | ||
depends_on: | ||
- minio | ||
entrypoint: > | ||
/bin/sh -c " | ||
/usr/bin/mc config host add myminio http://minio:9000 sampleaccesskey samplesecretkey; | ||
/usr/bin/mc mb myminio/meshdb-join-form-log; | ||
exit 0; | ||
" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4 | ||
with: | ||
python-version: '3.11' | ||
- name: "Upgrade pip" | ||
run: "pip install --upgrade pip" | ||
- name: "Install package" | ||
run: pip install ".[dev]" | ||
- name: Run Django Tests | ||
env: | ||
DB_NAME: nycmesh-dev | ||
DB_USER: nycmesh | ||
DB_PASSWORD: abcd1234 | ||
DB_HOST: localhost | ||
DB_PORT: 5432 | ||
DJANGO_SECRET_KEY: k7j&!u07c%%97s!^a_6%mh_wbzo*$hl4lj_6c2ee6dk)y9!k88 | ||
PELIAS_ADDRESS_PARSER_URL: http://localhost:6800/parser/parse | ||
QUERY_PSK: localdev | ||
NN_ASSIGN_PSK: localdev | ||
PANO_GITHUB_TOKEN: ${{ secrets.PANO_GITHUB_TOKEN }} | ||
DB_USER_RO: meshdb_ro | ||
DB_PASSWORD_RO: readonly | ||
run: coverage run src/manage.py test meshapi meshapi_hooks | ||
- name: Write coverage report to disk | ||
run: coverage html | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4.0.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |