Add user fixtures

This commit is contained in:
Seamus Johnston 2022-10-12 11:46:45 -05:00
parent 72e92c9b54
commit 3e4279ace4
No known key found for this signature in database
GPG key ID: 2F21225985069105
5 changed files with 98 additions and 2 deletions

40
.github/workflows/loaddata.yaml vendored Normal file
View file

@ -0,0 +1,40 @@
name: Reset database
# This workflow can be run from the CLI
# gh workflow run loaddata.yaml -f environment=staging
# OR
# cf run-task getgov-staging --wait \
# --command 'python manage.py flush' --name flush
# cf run-task getgov-staging --wait \
# --command 'python manage.py loaddata registrar/fixtures/*' --name loaddata
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Where should we load data
options:
- staging
jobs:
reset-db-staging:
if: ${{ github.event.inputs.environment == 'staging' }}
runs-on: ubuntu-latest
steps:
- name: Delete existing data for staging
uses: 18f/cg-deploy-action@main
with:
cf_username: ${{ secrets.CF_USERNAME }}
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: cisa-getgov-prototyping
cf_space: staging
full_command: "cf run-task getgov-staging --wait --command 'python manage.py flush' --name flush"
- name: Load fake data for staging
uses: 18f/cg-deploy-action@main
with:
cf_username: ${{ secrets.CF_USERNAME }}
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: cisa-getgov-prototyping
cf_space: staging
full_command: "cf run-task getgov-staging --wait --command 'python manage.py loaddata registrar/fixtures/*' --name loaddata"

View file

@ -1,4 +1,4 @@
name: Run Migrations
name: Run migrations
# This workflow can be run from the CLI
# gh workflow run migrate.yaml -f environment=sandbox

View file

@ -1,4 +1,4 @@
name: Security Checks
name: Security checks
on:
push: