Test: 本家に戻ってから再びkmyblueを導入したときのテスト (#474)

* Test: 本家に戻ってから再びkmyblueを導入したときのテスト

* Fix test

* Fix test

* Fix
This commit is contained in:
KMY(雪あすか) 2024-01-17 14:49:37 +09:00 committed by GitHub
parent 537f49e816
commit 77843c0bdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 95 additions and 3 deletions

View file

@ -348,3 +348,93 @@ jobs:
with:
name: test-search-screenshots
path: tmp/screenshots/
test-back-and-return:
name: Back to original and return test
runs-on: ubuntu-latest
needs:
- build
services:
postgres:
image: postgres:14-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
env:
DB_HOST: localhost
DB_USER: postgres
DB_PASS: postgres
DISABLE_SIMPLECOV: ${{ matrix.ruby-version != '.ruby-version' }}
RAILS_ENV: test
ALLOW_NOPAM: true
PAM_ENABLED: true
PAM_DEFAULT_SERVICE: pam_test
PAM_CONTROLLED_SERVICE: pam_test_controlled
OIDC_ENABLED: true
OIDC_SCOPE: read
SAML_ENABLED: true
CAS_ENABLED: true
BUNDLE_WITH: 'pam_authentication test'
GITHUB_RSPEC: ${{ matrix.ruby-version == '.ruby-version' && github.event.pull_request && 'true' }}
ES_ENABLED: false
BACK_UPSTREAM_FORCE: true
strategy:
fail-fast: false
matrix:
ruby-version:
- '.ruby-version'
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
path: './'
name: ${{ github.sha }}
- name: Expand archived asset artifacts
run: |
tar xvzf artifacts.tar.gz
- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby
with:
ruby-version: ${{ matrix.ruby-version}}
additional-system-dependencies: ffmpeg imagemagick libpam-dev
- name: Load database schema
run: './bin/rails db:create db:schema:load db:seed'
- name: Back to upstream schema
run: 'bundle exec rake dangerous:back_upstream'
- name: Return to kmyblue
run: './bin/rails db:migrate'
- run: bin/rspec
- name: Upload coverage reports to Codecov
if: matrix.ruby-version == '.ruby-version'
uses: codecov/codecov-action@v3
with:
files: coverage/lcov/mastodon-back-ret.lcov