Ref #903: remove Stripe diagram #313
Workflow file for this run
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 CI Checks | |
on: pull_request | |
jobs: | |
review_dependabot_pr: | |
permissions: | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
steps: | |
- name: Enable Dependabot automation | |
uses: mozilla/syseng-pod/actions/dependabot-automerge@main | |
run_unit_tests: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:12 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_HOST_AUTH_METHOD: trust | |
LC_COLLATE: en_US.UTF8 | |
LC_CTYPE: en_US.UTF8 | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry==1.7.1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "poetry" | |
- name: Install dependencies | |
run: poetry install | |
- name: Run tests | |
run: bin/test.sh | |
env: | |
CTMS_DB_URL: postgresql://postgres:postgres@172.17.0.1:5432/postgres | |
CTMS_SECRET_KEY: secret_${{ github.sha }} | |
build_production_image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build production image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: false | |
target: "production" | |
tags: ghcr.io/${{ github.repository }}:${{ github.sha }}-test-build | |
run_lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry==1.7.1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "poetry" | |
- name: Install dependencies | |
run: poetry install | |
- run: bin/lint.sh | |
env: | |
CTMS_DB_URL: postgresql://user@localhost/ | |
CTMS_SECRET_KEY: secret_${{ github.sha }} | |
run_integration_tests: | |
env: | |
DOCKER_COMPOSE: docker compose | |
POETRY_VIRTUALENVS_IN_PROJECT: 1 | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry==1.7.1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "poetry" | |
- name: Build containers | |
run: make build | |
- name: Start containers | |
run: make setup | |
- name: Run tests | |
run: make integration-test |