Run Stripe subscription syncing middleware only on specific pages #350
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: pull-request | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/commonknowledge/do-app-baseimage-django-node:364385f9d196a2bbe2d5faea025520cc0316501f | |
# Workaround for: https://github.com/actions/checkout/issues/211 | |
options: --user 1001 | |
volumes: | |
- "/home/runner/docker/.cache:/home/app/.cache" | |
env: | |
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres | |
DEBUG: True | |
PY_IGNORE_IMPORTMISMATCH: 1 | |
STRIPE_LIVE_MODE: "False" | |
STRIPE_TEST_PUBLIC_KEY: ${{ secrets.STRIPE_TEST_PUBLIC_KEY }} | |
STRIPE_TEST_SECRET_KEY: ${{ secrets.STRIPE_TEST_SECRET_KEY }} | |
services: | |
db: | |
image: kartoza/postgis:latest | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DBNAME: postgres | |
POSTGRES_HOSTNAME: postgres | |
POSTGRES_PORT: 5432 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: /home/runner/docker/.cache/poetry | |
key: do-app-baseimage-django-node:364385f9d196a2bbe2d5faea025520cc0316501f-poetry-${{ hashFiles('poetry.lock') }} | |
- run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry self update | |
- run: make install | |
- run: make ci |