2023-03-07 04:49:43 +01:00
|
|
|
name: Ruby Testing
|
|
|
|
|
|
|
|
on:
|
2024-07-07 11:39:31 +02:00
|
|
|
merge_group:
|
2023-03-07 04:49:43 +01:00
|
|
|
push:
|
2024-07-07 11:39:31 +02:00
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
- 'stable-*'
|
2023-03-07 04:49:43 +01:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
env:
|
|
|
|
BUNDLE_CLEAN: true
|
|
|
|
BUNDLE_FROZEN: true
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2023-05-05 09:06:51 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
|
|
|
mode:
|
|
|
|
- production
|
|
|
|
- test
|
2023-03-07 04:49:43 +01:00
|
|
|
env:
|
2023-05-05 09:06:51 +02:00
|
|
|
RAILS_ENV: ${{ matrix.mode }}
|
|
|
|
BUNDLE_WITH: ${{ matrix.mode }}
|
2024-06-10 22:08:04 +02:00
|
|
|
SECRET_KEY_BASE_DUMMY: 1
|
2023-03-07 04:49:43 +01:00
|
|
|
|
|
|
|
steps:
|
2023-09-11 10:41:26 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-03-07 04:49:43 +01:00
|
|
|
|
2023-10-24 13:43:24 +02:00
|
|
|
- name: Set up Ruby environment
|
|
|
|
uses: ./.github/actions/setup-ruby
|
2023-03-07 04:49:43 +01:00
|
|
|
|
2023-10-24 13:43:24 +02:00
|
|
|
- name: Set up Javascript environment
|
|
|
|
uses: ./.github/actions/setup-javascript
|
2023-03-07 04:49:43 +01:00
|
|
|
with:
|
2023-10-24 13:43:24 +02:00
|
|
|
onlyProduction: 'true'
|
2023-03-07 04:49:43 +01:00
|
|
|
|
2024-08-26 17:20:05 +02:00
|
|
|
- name: Cache assets from compilation
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
public/assets
|
|
|
|
public/packs
|
|
|
|
public/packs-test
|
|
|
|
tmp/cache/webpacker
|
|
|
|
key: ${{ matrix.mode }}-assets-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ matrix.mode }}-assets-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
|
|
|
|
${{ matrix.mode }}-assets-${{ github.head_ref || github.ref_name }}
|
|
|
|
${{ matrix.mode }}-assets-main
|
|
|
|
${{ matrix.mode }}-assets
|
|
|
|
|
2023-03-07 04:49:43 +01:00
|
|
|
- name: Precompile assets
|
|
|
|
run: |-
|
2024-08-26 17:20:05 +02:00
|
|
|
bin/rails assets:precompile
|
2023-03-07 04:49:43 +01:00
|
|
|
|
2023-11-03 15:12:14 +01:00
|
|
|
- name: Archive asset artifacts
|
|
|
|
run: |
|
|
|
|
tar --exclude={"*.br","*.gz"} -zcf artifacts.tar.gz public/assets public/packs*
|
|
|
|
|
2024-01-24 17:51:18 +01:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-05-05 09:06:51 +02:00
|
|
|
if: matrix.mode == 'test'
|
2023-03-07 04:49:43 +01:00
|
|
|
with:
|
|
|
|
path: |-
|
2023-11-03 15:12:14 +01:00
|
|
|
./artifacts.tar.gz
|
2023-03-07 04:49:43 +01:00
|
|
|
name: ${{ github.sha }}
|
|
|
|
retention-days: 0
|
|
|
|
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs:
|
|
|
|
- build
|
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
2023-03-10 11:10:47 +01:00
|
|
|
image: postgres:14-alpine
|
2023-03-07 04:49:43 +01:00
|
|
|
env:
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
options: >-
|
|
|
|
--health-cmd pg_isready
|
2024-06-14 17:49:08 +02:00
|
|
|
--health-interval 10ms
|
|
|
|
--health-timeout 3s
|
|
|
|
--health-retries 50
|
2023-03-07 04:49:43 +01:00
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
|
|
|
|
redis:
|
2023-03-10 11:10:47 +01:00
|
|
|
image: redis:7-alpine
|
2023-03-07 04:49:43 +01:00
|
|
|
options: >-
|
|
|
|
--health-cmd "redis-cli ping"
|
2024-06-14 17:49:08 +02:00
|
|
|
--health-interval 10ms
|
|
|
|
--health-timeout 3s
|
|
|
|
--health-retries 50
|
2023-03-07 04:49:43 +01:00
|
|
|
ports:
|
|
|
|
- 6379:6379
|
|
|
|
|
|
|
|
env:
|
|
|
|
DB_HOST: localhost
|
|
|
|
DB_USER: postgres
|
|
|
|
DB_PASS: postgres
|
2023-11-14 17:53:38 +01:00
|
|
|
DISABLE_SIMPLECOV: ${{ matrix.ruby-version != '.ruby-version' }}
|
2023-03-07 04:49:43 +01:00
|
|
|
RAILS_ENV: test
|
|
|
|
ALLOW_NOPAM: true
|
|
|
|
PAM_ENABLED: true
|
|
|
|
PAM_DEFAULT_SERVICE: pam_test
|
|
|
|
PAM_CONTROLLED_SERVICE: pam_test_controlled
|
2023-07-25 09:46:57 +02:00
|
|
|
OIDC_ENABLED: true
|
|
|
|
OIDC_SCOPE: read
|
|
|
|
SAML_ENABLED: true
|
|
|
|
CAS_ENABLED: true
|
2023-05-05 09:06:51 +02:00
|
|
|
BUNDLE_WITH: 'pam_authentication test'
|
2023-10-18 15:20:24 +02:00
|
|
|
GITHUB_RSPEC: ${{ matrix.ruby-version == '.ruby-version' && github.event.pull_request && 'true' }}
|
2023-03-07 04:49:43 +01:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
ruby-version:
|
2024-04-29 09:41:59 +02:00
|
|
|
- '3.2'
|
2023-03-07 04:49:43 +01:00
|
|
|
- '.ruby-version'
|
|
|
|
steps:
|
2023-09-11 10:41:26 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-03-07 04:49:43 +01:00
|
|
|
|
2024-01-24 17:51:18 +01:00
|
|
|
- uses: actions/download-artifact@v4
|
2023-03-07 04:49:43 +01:00
|
|
|
with:
|
2023-11-03 15:12:14 +01:00
|
|
|
path: './'
|
2023-03-07 04:49:43 +01:00
|
|
|
name: ${{ github.sha }}
|
|
|
|
|
2023-11-03 15:12:14 +01:00
|
|
|
- name: Expand archived asset artifacts
|
|
|
|
run: |
|
|
|
|
tar xvzf artifacts.tar.gz
|
|
|
|
|
2023-10-24 13:43:24 +02:00
|
|
|
- name: Set up Ruby environment
|
|
|
|
uses: ./.github/actions/setup-ruby
|
2023-03-07 04:49:43 +01:00
|
|
|
with:
|
|
|
|
ruby-version: ${{ matrix.ruby-version}}
|
2024-10-16 10:03:35 +02:00
|
|
|
additional-system-dependencies: ffmpeg imagemagick libpam-dev
|
2023-03-07 04:49:43 +01:00
|
|
|
|
|
|
|
- name: Load database schema
|
2024-06-27 09:42:57 +02:00
|
|
|
run: |
|
|
|
|
bin/rails db:setup
|
|
|
|
bin/flatware fan bin/rails db:test:prepare
|
2023-03-07 04:49:43 +01:00
|
|
|
|
2024-08-27 17:23:08 +02:00
|
|
|
- name: Cache RSpec persistence file
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
tmp/rspec/examples.txt
|
|
|
|
key: rspec-persistence-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
rspec-persistence-${{ github.head_ref || github.ref_name }}-${{ github.sha }}-${{ matrix.ruby-version }}
|
|
|
|
rspec-persistence-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
|
|
|
|
rspec-persistence-${{ github.head_ref || github.ref_name }}
|
|
|
|
rspec-persistence-main
|
|
|
|
rspec-persistence
|
|
|
|
|
2024-06-27 09:42:57 +02:00
|
|
|
- run: bin/flatware rspec -r ./spec/flatware_helper.rb
|
2023-07-28 23:09:49 +02:00
|
|
|
|
2023-11-14 17:53:38 +01:00
|
|
|
- name: Upload coverage reports to Codecov
|
|
|
|
if: matrix.ruby-version == '.ruby-version'
|
2024-12-16 13:36:36 +01:00
|
|
|
uses: codecov/codecov-action@v5
|
2023-11-14 17:53:38 +01:00
|
|
|
with:
|
2024-06-27 09:42:57 +02:00
|
|
|
files: coverage/lcov/*.lcov
|
2024-05-10 10:00:02 +02:00
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
2023-11-14 17:53:38 +01:00
|
|
|
|
2024-06-05 21:15:39 +02:00
|
|
|
test-libvips:
|
|
|
|
name: Libvips tests
|
|
|
|
runs-on: ubuntu-24.04
|
|
|
|
|
|
|
|
needs:
|
|
|
|
- build
|
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: postgres:14-alpine
|
|
|
|
env:
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
options: >-
|
|
|
|
--health-cmd pg_isready
|
2024-06-14 17:49:08 +02:00
|
|
|
--health-interval 10ms
|
|
|
|
--health-timeout 3s
|
|
|
|
--health-retries 50
|
2024-06-05 21:15:39 +02:00
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:7-alpine
|
|
|
|
options: >-
|
|
|
|
--health-cmd "redis-cli ping"
|
2024-06-14 17:49:08 +02:00
|
|
|
--health-interval 10ms
|
|
|
|
--health-timeout 3s
|
|
|
|
--health-retries 50
|
2024-06-05 21:15:39 +02:00
|
|
|
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' }}
|
|
|
|
MASTODON_USE_LIBVIPS: true
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
ruby-version:
|
|
|
|
- '3.2'
|
|
|
|
- '.ruby-version'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@v4
|
|
|
|
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}}
|
2024-10-16 10:03:35 +02:00
|
|
|
additional-system-dependencies: ffmpeg libpam-dev
|
2024-06-05 21:15:39 +02:00
|
|
|
|
|
|
|
- name: Load database schema
|
|
|
|
run: './bin/rails db:create db:schema:load db:seed'
|
|
|
|
|
2024-07-08 18:01:08 +02:00
|
|
|
- run: bin/rspec --tag attachment_processing
|
2024-06-05 21:15:39 +02:00
|
|
|
|
|
|
|
- name: Upload coverage reports to Codecov
|
|
|
|
if: matrix.ruby-version == '.ruby-version'
|
2024-12-16 13:36:36 +01:00
|
|
|
uses: codecov/codecov-action@v5
|
2024-06-05 21:15:39 +02:00
|
|
|
with:
|
|
|
|
files: coverage/lcov/mastodon.lcov
|
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
|
2023-07-28 23:09:49 +02:00
|
|
|
test-e2e:
|
|
|
|
name: End to End testing
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs:
|
|
|
|
- build
|
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: postgres:14-alpine
|
|
|
|
env:
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
options: >-
|
|
|
|
--health-cmd pg_isready
|
2024-06-14 17:49:08 +02:00
|
|
|
--health-interval 10ms
|
|
|
|
--health-timeout 3s
|
|
|
|
--health-retries 50
|
2023-07-28 23:09:49 +02:00
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:7-alpine
|
|
|
|
options: >-
|
|
|
|
--health-cmd "redis-cli ping"
|
2024-06-14 17:49:08 +02:00
|
|
|
--health-interval 10ms
|
|
|
|
--health-timeout 3s
|
|
|
|
--health-retries 50
|
2023-07-28 23:09:49 +02:00
|
|
|
ports:
|
|
|
|
- 6379:6379
|
|
|
|
|
|
|
|
env:
|
|
|
|
DB_HOST: localhost
|
|
|
|
DB_USER: postgres
|
|
|
|
DB_PASS: postgres
|
|
|
|
DISABLE_SIMPLECOV: true
|
|
|
|
RAILS_ENV: test
|
|
|
|
BUNDLE_WITH: test
|
2024-05-10 14:36:09 +02:00
|
|
|
LOCAL_DOMAIN: localhost:3000
|
|
|
|
LOCAL_HTTPS: false
|
2023-07-28 23:09:49 +02:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
ruby-version:
|
2024-04-29 09:41:59 +02:00
|
|
|
- '3.2'
|
2023-07-28 23:09:49 +02:00
|
|
|
- '.ruby-version'
|
|
|
|
|
|
|
|
steps:
|
2023-09-11 10:41:26 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-07-28 23:09:49 +02:00
|
|
|
|
2024-01-24 17:51:18 +01:00
|
|
|
- uses: actions/download-artifact@v4
|
2023-07-28 23:09:49 +02:00
|
|
|
with:
|
2024-06-19 11:31:30 +02:00
|
|
|
path: './'
|
2023-07-28 23:09:49 +02:00
|
|
|
name: ${{ github.sha }}
|
|
|
|
|
2024-06-19 11:31:30 +02:00
|
|
|
- name: Expand archived asset artifacts
|
|
|
|
run: |
|
|
|
|
tar xvzf artifacts.tar.gz
|
|
|
|
|
2023-10-24 13:43:24 +02:00
|
|
|
- name: Set up Ruby environment
|
|
|
|
uses: ./.github/actions/setup-ruby
|
2023-07-28 23:09:49 +02:00
|
|
|
with:
|
|
|
|
ruby-version: ${{ matrix.ruby-version}}
|
2024-10-16 10:03:35 +02:00
|
|
|
additional-system-dependencies: ffmpeg imagemagick
|
2023-07-28 23:09:49 +02:00
|
|
|
|
2023-10-24 13:43:24 +02:00
|
|
|
- name: Set up Javascript environment
|
|
|
|
uses: ./.github/actions/setup-javascript
|
2023-07-28 23:09:49 +02:00
|
|
|
|
|
|
|
- name: Load database schema
|
|
|
|
run: './bin/rails db:create db:schema:load db:seed'
|
|
|
|
|
2024-05-10 14:36:09 +02:00
|
|
|
- run: bin/rspec spec/system --tag streaming --tag js
|
2023-07-28 23:09:49 +02:00
|
|
|
|
|
|
|
- name: Archive logs
|
2024-01-24 17:51:18 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-07-28 23:09:49 +02:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: e2e-logs-${{ matrix.ruby-version }}
|
|
|
|
path: log/
|
|
|
|
|
|
|
|
- name: Archive test screenshots
|
2024-01-24 17:51:18 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-07-28 23:09:49 +02:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: e2e-screenshots
|
2024-02-07 14:37:10 +01:00
|
|
|
path: tmp/capybara/
|
2023-09-08 16:17:55 +02:00
|
|
|
|
|
|
|
test-search:
|
2023-11-17 12:52:20 +01:00
|
|
|
name: Elastic Search integration testing
|
2023-09-08 16:17:55 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
needs:
|
|
|
|
- build
|
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: postgres:14-alpine
|
|
|
|
env:
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
options: >-
|
|
|
|
--health-cmd pg_isready
|
2024-06-14 17:49:08 +02:00
|
|
|
--health-interval 10ms
|
|
|
|
--health-timeout 3s
|
|
|
|
--health-retries 50
|
2023-09-08 16:17:55 +02:00
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:7-alpine
|
|
|
|
options: >-
|
|
|
|
--health-cmd "redis-cli ping"
|
2024-06-14 17:49:08 +02:00
|
|
|
--health-interval 10ms
|
|
|
|
--health-timeout 3s
|
|
|
|
--health-retries 50
|
2023-09-08 16:17:55 +02:00
|
|
|
ports:
|
|
|
|
- 6379:6379
|
|
|
|
|
2024-05-14 19:54:28 +02:00
|
|
|
elasticsearch:
|
|
|
|
image: ${{ contains(matrix.search-image, 'elasticsearch') && matrix.search-image || '' }}
|
2023-09-08 16:17:55 +02:00
|
|
|
env:
|
|
|
|
discovery.type: single-node
|
|
|
|
xpack.security.enabled: false
|
|
|
|
options: >-
|
|
|
|
--health-cmd "curl http://localhost:9200/_cluster/health"
|
2024-06-14 17:49:08 +02:00
|
|
|
--health-interval 2s
|
|
|
|
--health-timeout 3s
|
|
|
|
--health-retries 50
|
2023-09-08 16:17:55 +02:00
|
|
|
ports:
|
|
|
|
- 9200:9200
|
|
|
|
|
2024-05-14 19:54:28 +02:00
|
|
|
opensearch:
|
|
|
|
image: ${{ contains(matrix.search-image, 'opensearch') && matrix.search-image || '' }}
|
|
|
|
env:
|
|
|
|
discovery.type: single-node
|
|
|
|
DISABLE_INSTALL_DEMO_CONFIG: true
|
|
|
|
DISABLE_SECURITY_PLUGIN: true
|
|
|
|
options: >-
|
|
|
|
--health-cmd "curl http://localhost:9200/_cluster/health"
|
2024-06-14 17:49:08 +02:00
|
|
|
--health-interval 2s
|
|
|
|
--health-timeout 3s
|
|
|
|
--health-retries 50
|
2024-05-14 19:54:28 +02:00
|
|
|
ports:
|
|
|
|
- 9200:9200
|
|
|
|
|
2023-09-08 16:17:55 +02:00
|
|
|
env:
|
|
|
|
DB_HOST: localhost
|
|
|
|
DB_USER: postgres
|
|
|
|
DB_PASS: postgres
|
|
|
|
DISABLE_SIMPLECOV: true
|
|
|
|
RAILS_ENV: test
|
|
|
|
BUNDLE_WITH: test
|
|
|
|
ES_ENABLED: true
|
|
|
|
ES_HOST: localhost
|
|
|
|
ES_PORT: 9200
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
ruby-version:
|
2024-04-29 09:41:59 +02:00
|
|
|
- '3.2'
|
2023-09-08 16:17:55 +02:00
|
|
|
- '.ruby-version'
|
2023-10-03 10:48:32 +02:00
|
|
|
search-image:
|
|
|
|
- docker.elastic.co/elasticsearch/elasticsearch:7.17.13
|
|
|
|
include:
|
|
|
|
- ruby-version: '.ruby-version'
|
|
|
|
search-image: docker.elastic.co/elasticsearch/elasticsearch:8.10.2
|
2024-05-14 19:54:28 +02:00
|
|
|
- ruby-version: '.ruby-version'
|
|
|
|
search-image: opensearchproject/opensearch:2
|
2023-09-08 16:17:55 +02:00
|
|
|
|
|
|
|
steps:
|
2023-09-11 10:41:26 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-09-08 16:17:55 +02:00
|
|
|
|
2024-01-24 17:51:18 +01:00
|
|
|
- uses: actions/download-artifact@v4
|
2023-09-08 16:17:55 +02:00
|
|
|
with:
|
2024-06-19 11:31:30 +02:00
|
|
|
path: './'
|
2023-09-08 16:17:55 +02:00
|
|
|
name: ${{ github.sha }}
|
|
|
|
|
2023-10-24 13:43:24 +02:00
|
|
|
- name: Set up Ruby environment
|
|
|
|
uses: ./.github/actions/setup-ruby
|
2023-09-08 16:17:55 +02:00
|
|
|
with:
|
|
|
|
ruby-version: ${{ matrix.ruby-version}}
|
2024-10-16 10:03:35 +02:00
|
|
|
additional-system-dependencies: ffmpeg imagemagick
|
2023-09-08 16:17:55 +02:00
|
|
|
|
2023-10-24 13:43:24 +02:00
|
|
|
- name: Set up Javascript environment
|
|
|
|
uses: ./.github/actions/setup-javascript
|
2023-09-08 16:17:55 +02:00
|
|
|
|
|
|
|
- name: Load database schema
|
|
|
|
run: './bin/rails db:create db:schema:load db:seed'
|
|
|
|
|
2023-11-17 12:52:20 +01:00
|
|
|
- run: bin/rspec --tag search
|
2023-09-08 16:17:55 +02:00
|
|
|
|
|
|
|
- name: Archive logs
|
2024-01-24 17:51:18 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-09-08 16:17:55 +02:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: test-search-logs-${{ matrix.ruby-version }}
|
|
|
|
path: log/
|
|
|
|
|
|
|
|
- name: Archive test screenshots
|
2024-01-24 17:51:18 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-09-08 16:17:55 +02:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: test-search-screenshots
|
2024-02-07 14:37:10 +01:00
|
|
|
path: tmp/capybara/
|