mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-26 23:41:52 +00:00
79b0e192d9
Some checks failed
Check i18n / check-i18n (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
CSS Linting / lint (push) Waiting to run
JavaScript Linting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
JavaScript Testing / test (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Waiting to run
Historical data migration test / test (15-alpine) (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.1) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / Libvips tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.1) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.1) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.1, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Bundler Audit / security (push) Has been cancelled
Haml Linting / lint (push) Has been cancelled
94 lines
2.1 KiB
YAML
94 lines
2.1 KiB
YAML
name: Historical data migration test
|
|
|
|
on:
|
|
merge_group:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- 'stable-*'
|
|
paths:
|
|
- 'Gemfile*'
|
|
- '.ruby-version'
|
|
- '**/*.rb'
|
|
- '.github/workflows/test-migrations.yml'
|
|
- 'lib/tasks/tests.rake'
|
|
|
|
pull_request:
|
|
paths:
|
|
- 'Gemfile*'
|
|
- '.ruby-version'
|
|
- '**/*.rb'
|
|
- '.github/workflows/test-migrations.yml'
|
|
- 'lib/tasks/tests.rake'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
postgres:
|
|
- 14-alpine
|
|
- 15-alpine
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:${{ matrix.postgres}}
|
|
env:
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_USER: postgres
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10ms
|
|
--health-timeout 3s
|
|
--health-retries 50
|
|
ports:
|
|
- 5432:5432
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 10ms
|
|
--health-timeout 3s
|
|
--health-retries 50
|
|
ports:
|
|
- 6379:6379
|
|
|
|
env:
|
|
DB_HOST: localhost
|
|
DB_USER: postgres
|
|
DB_PASS: postgres
|
|
DISABLE_SIMPLECOV: true
|
|
RAILS_ENV: test
|
|
BUNDLE_CLEAN: true
|
|
BUNDLE_FROZEN: true
|
|
BUNDLE_WITHOUT: 'development:production'
|
|
BUNDLE_JOBS: 3
|
|
BUNDLE_RETRY: 3
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Ruby environment
|
|
uses: ./.github/actions/setup-ruby
|
|
|
|
- name: Test "one step migration" flow
|
|
run: |
|
|
bin/rails db:drop
|
|
bin/rails db:create
|
|
bin/rails tests:migrations:prepare_database
|
|
bin/rails db:migrate
|
|
bin/rails tests:migrations:check_database
|
|
|
|
- name: Test "two step migration" flow
|
|
run: |
|
|
bin/rails db:drop
|
|
bin/rails db:create
|
|
SKIP_POST_DEPLOYMENT_MIGRATIONS=true bin/rails tests:migrations:prepare_database
|
|
SKIP_POST_DEPLOYMENT_MIGRATIONS=true bin/rails db:migrate
|
|
bin/rails db:migrate
|
|
bin/rails tests:migrations:check_database
|