Add a way to see if a user is an assignable adopter and if school is integrated #1671
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: Migrations | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- synchronize | |
- reopened | |
jobs: | |
migrations: | |
timeout-minutes: 30 | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: postgres:11 | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
# Set health checks to wait until redis has started | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
# Clone repo and checkout merge commit parent (PR target commit) | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- run: git checkout HEAD^ | |
# Install base commit ruby version | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
# Create data to be migrated and revert to PR merge commit | |
- name: Create data to be migrated | |
env: | |
OXA_DB_USER: postgres | |
OXA_DB_PASS: postgres | |
run: | | |
bundle install --jobs 4 --retry 3 | |
bundle exec rake db:create db:schema:load db:seed --trace | |
bundle exec rails runner '3.times { FactoryBot.create :user }' | |
git checkout --force - | |
# Install PR ruby version | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
# Migrate the data | |
- name: Migrate | |
env: | |
OXA_DB_USER: postgres | |
OXA_DB_PASS: postgres | |
run: | | |
bundle install --jobs 4 --retry 3 | |
bundle exec rake db:migrate |