Skip to content

Commit

Permalink
Merge pull request #2126 from DFE-Digital/example-data-generation
Browse files Browse the repository at this point in the history
Improve fake data generation
  • Loading branch information
thomasleese authored Apr 9, 2024
2 parents 3c337ee + c4d8320 commit ac1baba
Show file tree
Hide file tree
Showing 17 changed files with 915 additions and 281 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deploy-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ runs:
shell: bash
run: |
make ci review get-cluster-credentials
kubectl exec -n tra-development deployment/apply-for-qts-review-${PULL_REQUEST_NUMBER}-web -- sh -c "cd /app && /usr/local/bin/bundle exec rails db:seed review_app:configure example_data:generate"
kubectl exec -n tra-development deployment/apply-for-qts-review-${PULL_REQUEST_NUMBER}-web -- sh -c "cd /app && /usr/local/bin/bundle exec rails db:seed review_app:configure fake_data:generate"
env:
PULL_REQUEST_NUMBER: ${{ inputs.pull-request-number }}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Example data
name: Fake data

on:
workflow_dispatch:
Expand All @@ -16,7 +16,7 @@ jobs:
name: Regenerate
runs-on: ubuntu-latest

environment: ${{ github.event.inputs.environment }}_aks
environment: ${{ github.event.inputs.environment }}

steps:
- uses: actions/checkout@v4
Expand All @@ -35,4 +35,4 @@ jobs:
kubectl exec \
-n tra-${{ github.event.inputs.environment }} \
deployment/apply-for-qts-${{ github.event.inputs.environment }}-web \
-- sh -c "cd /app && /usr/local/bin/bundle exec rails db:seed example_data:regenerate"
-- sh -c "cd /app && /usr/local/bin/bundle exec rails db:seed fake_data:regenerate"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ Setup the project (re-run after `Gemfile` or `package.json` updates, automatical
bin/setup
```

Example data and personas. For development and non-production environments we have an example data generation script that includes persona based logins.
Generate fake application forms and staff. For development and non-production environments we have a script that generates useful fake data.

```bash
bundle exec rake example_data:generate
bundle exec rake fake_data:generate
```

To enable the 'personas' feature, from the rails console
Expand Down
1 change: 1 addition & 0 deletions app/components/status_tag/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def tags
pre_assessment: "pink",
preliminary_check: "pink",
received: "purple",
received_and_overdue: "pink",
received_consent: "purple",
received_ecctis: "purple",
received_further_information: "purple",
Expand Down
Loading

0 comments on commit ac1baba

Please sign in to comment.