Skip to content

Commit

Permalink
Merge pull request #781 from kmycode/upstream-20240716
Browse files Browse the repository at this point in the history
Upstream 20240716
  • Loading branch information
kmycode authored Jul 16, 2024
2 parents 5629bc6 + 0b735df commit 513f1d1
Show file tree
Hide file tree
Showing 204 changed files with 1,749 additions and 1,069 deletions.
6 changes: 3 additions & 3 deletions .env.production.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is a sample configuration file. You can generate your configuration
# with the `rake mastodon:setup` interactive setup wizard, but to customize
# with the `bundle exec rails mastodon:setup` interactive setup wizard, but to customize
# your setup even further, you'll need to edit it manually. This sample does
# not demonstrate all available configuration options. Please look at
# https://docs.joinmastodon.org/admin/config/ for the full documentation.
Expand Down Expand Up @@ -40,14 +40,14 @@ ES_PASS=password

# Secrets
# -------
# Make sure to use `rake secret` to generate secrets
# Make sure to use `bundle exec rails secret` to generate secrets
# -------
SECRET_KEY_BASE=
OTP_SECRET=

# Web Push
# --------
# Generate with `rake mastodon:webpush:generate_vapid_key`
# Generate with `bundle exec rails mastodon:webpush:generate_vapid_key`
# --------
VAPID_PRIVATE_KEY=
VAPID_PUBLIC_KEY=
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/bundler-audit.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: Bundler Audit
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'
paths:
- 'Gemfile*'
- '.ruby-version'
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/check-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@ name: Check i18n

on:
push:
branches: [main]
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'
pull_request:
branches: [main]
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'

env:
RAILS_ENV: test
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
name: 'CodeQL'

on:
merge_group:
push:
branches: ['main']
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'
pull_request:
# The branches below must be a subset of the branches above
branches: ['main']
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'
schedule:
- cron: '22 6 * * 1'

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Check formatting
on:
merge_group:
push:
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'
pull_request:

jobs:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/lint-css.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: CSS Linting
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'
paths:
- 'package.json'
- 'yarn.lock'
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/lint-haml.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Haml Linting
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'
paths:
- '.github/workflows/haml-lint-problem-matcher.json'
- '.github/workflows/lint-haml.yml'
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/lint-js.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: JavaScript Linting
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'
paths:
- 'package.json'
- 'yarn.lock'
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/lint-ruby.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Ruby Linting
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'
paths:
- 'Gemfile*'
- '.rubocop*.yml'
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/test-js.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: JavaScript Testing
on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'
paths:
- 'package.json'
- 'yarn.lock'
Expand Down
37 changes: 20 additions & 17 deletions .github/workflows/test-migrations.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
name: Historical data migration test

on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- '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:
pre_job:
runs-on: ubuntu-latest

outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}

steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
paths: '["Gemfile*", ".ruby-version", "**/*.rb", ".github/workflows/test-migrations.yml", "lib/tasks/tests.rake"]'

test:
runs-on: ubuntu-latest
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'

strategy:
fail-fast: false
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: Ruby Testing

on:
merge_group:
push:
branches-ignore:
- 'dependabot/**'
- 'renovate/**'
branches:
- 'main'
- 'kb*'
- 'upstream-*'
- 'releases/*'
- 'stable-*'
pull_request:

env:
Expand Down Expand Up @@ -224,7 +228,7 @@ jobs:
- name: Load database schema
run: './bin/rails db:create db:schema:load db:seed'

- run: bin/rspec --tag paperclip_processing
- run: bin/rspec --tag attachment_processing

- name: Upload coverage reports to Codecov
if: matrix.ruby-version == '.ruby-version'
Expand Down
4 changes: 2 additions & 2 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp`
# using RuboCop version 1.64.1.
# using RuboCop version 1.65.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand All @@ -14,7 +14,7 @@ Lint/NonLocalExitFromIterator:
Metrics/AbcSize:
Max: 82

# Configuration parameters: CountBlocks, Max.
# Configuration parameters: CountBlocks, CountModifierForms, Max.
Metrics/BlockNesting:
Exclude:
- 'lib/tasks/mastodon.rake'
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.3
3.3.4
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG BUILDPLATFORM=${BUILDPLATFORM}

# Ruby image to use for base image, change with [--build-arg RUBY_VERSION="3.3.x"]
# renovate: datasource=docker depName=docker.io/ruby
ARG RUBY_VERSION="3.3.3"
ARG RUBY_VERSION="3.3.4"
# # Node version to use in base image, change with [--build-arg NODE_MAJOR_VERSION="20"]
# renovate: datasource=node-version depName=node
ARG NODE_MAJOR_VERSION="20"
Expand Down Expand Up @@ -67,7 +67,9 @@ ENV \
# Optimize jemalloc 5.x performance
MALLOC_CONF="narenas:2,background_thread:true,thp:never,dirty_decay_ms:1000,muzzy_decay_ms:0" \
# Enable libvips, should not be changed
MASTODON_USE_LIBVIPS=true
MASTODON_USE_LIBVIPS=true \
# Sidekiq will touch tmp/sidekiq_process_has_started_and_will_begin_processing_jobs to indicate it is ready. This can be used for a readiness check in Kubernetes
MASTODON_SIDEKIQ_READY_FILENAME=sidekiq_process_has_started_and_will_begin_processing_jobs

# Set default shell used for running commands
SHELL ["/bin/bash", "-o", "pipefail", "-o", "errexit", "-c"]
Expand Down
22 changes: 11 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ GEM
case_transform (0.2)
activesupport
cbor (0.5.9.8)
charlock_holmes (0.7.8)
charlock_holmes (0.7.9)
chewy (7.6.0)
activesupport (>= 5.2)
elasticsearch (>= 7.14.0, < 8)
Expand All @@ -180,7 +180,7 @@ GEM
css_parser (1.17.1)
addressable
csv (3.3.0)
database_cleaner-active_record (2.1.0)
database_cleaner-active_record (2.2.0)
activerecord (>= 5.a)
database_cleaner-core (~> 2.0.0)
database_cleaner-core (2.0.1)
Expand Down Expand Up @@ -346,7 +346,7 @@ GEM
activesupport (>= 3.0)
nokogiri (>= 1.6)
io-console (0.7.2)
irb (1.13.2)
irb (1.14.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jmespath (1.6.2)
Expand Down Expand Up @@ -583,15 +583,15 @@ GEM
orm_adapter (0.5.0)
ox (2.14.18)
parallel (1.25.1)
parser (3.3.3.0)
parser (3.3.4.0)
ast (~> 2.4.1)
racc
parslet (2.0.0)
pastel (0.8.0)
tty-color (~> 0.5)
pg (1.5.6)
pghero (3.5.0)
activerecord (>= 6)
pghero (3.6.0)
activerecord (>= 6.1)
premailer (1.23.0)
addressable
css_parser (>= 1.12.0)
Expand Down Expand Up @@ -733,13 +733,13 @@ GEM
rspec-mocks (~> 3.0)
sidekiq (>= 5, < 8)
rspec-support (3.13.1)
rubocop (1.64.1)
rubocop (1.65.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
Expand All @@ -756,7 +756,7 @@ GEM
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.0.2)
rubocop-rspec (3.0.3)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
Expand Down Expand Up @@ -793,10 +793,10 @@ GEM
redis (>= 4.5.0, < 5)
sidekiq-bulk (0.2.0)
sidekiq
sidekiq-scheduler (5.0.3)
sidekiq-scheduler (5.0.5)
rufus-scheduler (~> 3.2)
sidekiq (>= 6, < 8)
tilt (>= 1.4.0)
tilt (>= 1.4.0, < 3)
sidekiq-unique-jobs (7.1.33)
brpoplpush-redis_script (> 0.1.1, <= 2.0.0)
concurrent-ruby (~> 1.0, >= 1.0.5)
Expand Down
Loading

0 comments on commit 513f1d1

Please sign in to comment.