mirror of https://github.com/mastodon/mastodon.git
Run flatware on CI
parent
6d3fbf939e
commit
9a61df1ca0
|
@ -132,15 +132,17 @@ jobs:
|
||||||
additional-system-dependencies: ffmpeg libpam-dev
|
additional-system-dependencies: ffmpeg libpam-dev
|
||||||
|
|
||||||
- name: Load database schema
|
- name: Load database schema
|
||||||
run: './bin/rails db:create db:schema:load db:seed'
|
run: |
|
||||||
|
bin/rails db:setup
|
||||||
|
bin/flatware fan bin/rails db:test:prepare
|
||||||
|
|
||||||
- run: bin/rspec
|
- run: bin/flatware rspec -r ./spec/flatware_helper.rb
|
||||||
|
|
||||||
- name: Upload coverage reports to Codecov
|
- name: Upload coverage reports to Codecov
|
||||||
if: matrix.ruby-version == '.ruby-version'
|
if: matrix.ruby-version == '.ruby-version'
|
||||||
uses: codecov/codecov-action@v4
|
uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
files: coverage/lcov/mastodon.lcov
|
files: coverage/lcov/*.lcov
|
||||||
env:
|
env:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
if defined?(Flatware)
|
||||||
|
Flatware.configure do |config|
|
||||||
|
config.after_fork do |test_env_number|
|
||||||
|
unless ENV.fetch('DISABLE_SIMPLECOV', nil) == 'true'
|
||||||
|
require 'simplecov'
|
||||||
|
SimpleCov.at_fork.call(test_env_number) # Combines parallel coverage results
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue