Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic es tests #12

Merged
merged 199 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
255606d
Update dependency haml_lint to v0.49.2 (#26222)
renovate[bot] Jul 28, 2023
81cdc0f
Fix: Streaming server memory leak in HTTP EventSource cleanup (#26228)
ThisIsMissEm Jul 28, 2023
446821a
Swap debug statements in streaming server (#26231)
ClearlyClaire Jul 28, 2023
3554c52
Fix missing return values in streaming (#26233)
renchap Jul 28, 2023
f96e4b3
Use original URL in preview if it redirects to 4xx page (#26200)
c960657 Jul 28, 2023
b0134db
Allow filtering for Chinese languages (#26066)
gunchleoc Jul 28, 2023
8d5d707
Update README.md (#25435)
JAYKALIA007 Jul 28, 2023
4d1b67f
Add end-to-end (system) tests (#25461)
renchap Jul 28, 2023
30f5ec7
Rubocop fix: `Perfomance/UnfreezeString` (#26217)
mjankowski Jul 28, 2023
ad81be6
Update rubocop rules for linelength (#26190)
mjankowski Jul 28, 2023
6602edf
Add coverage for `LanguageValidator` (#25593)
mjankowski Jul 28, 2023
660993b
Add coverage for `URLValidator` (#25591)
mjankowski Jul 28, 2023
6f1fa13
Fix `RSpec/EmptyExampleGroup` cop (#24735)
mjankowski Jul 28, 2023
7581b1f
Profiling tools configuration improvement (#25383)
mjankowski Jul 28, 2023
8ac9e44
Load `rspec-rails` gem in `test` + `development` (#25768)
mjankowski Jul 28, 2023
74903af
Ignore the brakeman `PermitAttributes` check (#25915)
mjankowski Jul 28, 2023
4d3a129
Fix public TL not indicating new toots when `onlyRemote` is enabled (…
Plastikmensch Jul 29, 2023
d76f79f
Remove obsolete backport from Rails 7 (#26254)
c960657 Jul 29, 2023
d4807a5
Change aspect ratios on link previews in web UI (#26250)
Gargron Jul 30, 2023
d82abc8
Fix `Importer::BaseImporter#clean_up!` not using proper primary key (…
ClearlyClaire Jul 31, 2023
51768de
Bump version to v4.1.6 (#26272)
ClearlyClaire Jul 31, 2023
fd28431
Do not normalize URL before fetching it (#26219)
c960657 Jul 31, 2023
6c39125
Change /api/v1/peers/search to be case-insensitive when using Elastic…
ClearlyClaire Aug 1, 2023
71fd703
Change interaction modal input to disable browser spell-checking, cap…
ClearlyClaire Aug 1, 2023
f225706
Fix AVIF attachments (#26264)
c960657 Aug 1, 2023
ca342d4
Add List-Unsubscribe email header (#26085)
c960657 Aug 1, 2023
4c999a7
Fix wrong border radius on link cards in web UI (#26287)
Gargron Aug 1, 2023
01f0cff
Fix line clamp for link previews in web UI (#26286)
Gargron Aug 2, 2023
2cbdff9
Change design of role badges in web UI (#26281)
Gargron Aug 2, 2023
8891d89
Fix request URL normalisation for bare domain and 8-bit characters (#…
c960657 Aug 2, 2023
e258b4c
Refactor: replace whitelist_mode mentions with limited_federation_mod…
ThisIsMissEm Aug 2, 2023
6308dca
change column link to add a better keyboard focus indicator (#26278)
Aug 2, 2023
425d77f
Fix crash in `tootctl status remove` and some old migrations (#26210)
ClearlyClaire Aug 2, 2023
2f932cb
Add client-side timeout on resend confirmation button (#26300)
Gargron Aug 2, 2023
f55f0ab
Allow spaces around commas in ALLOWED_PRIVATE_ADDRESSES (#26297)
progval Aug 3, 2023
a0fad5c
Change indexing frequency from 5 minutes to 1 minute, add locks to sc…
Gargron Aug 3, 2023
6b896b2
Add primary key to preview_cards_statuses join table (includes dedupl…
ClearlyClaire Aug 3, 2023
3a4d3e9
Add `GET /api/v1/instance/languages` to REST API (#24443)
danielmbrasil Aug 3, 2023
ca19ea3
Update dependency aws-sdk-s3 to v1.132.0 (#26227)
renovate[bot] Aug 3, 2023
8da99ff
Add alt text for preview card thumbnails (#26184)
c960657 Aug 3, 2023
091c2f2
Update dependency rack to v2.2.8 (#26312)
renovate[bot] Aug 3, 2023
670dae3
Update dependency react-redux to v8.1.2 (#26314)
renovate[bot] Aug 3, 2023
a615c0c
Update dependency test-prof to v1.2.2 (#26316)
renovate[bot] Aug 3, 2023
f6e4137
Update dependency core-js to v3.32.0 (#26317)
renovate[bot] Aug 3, 2023
51cee42
Update dependency lograge to v0.13.0 (#26318)
renovate[bot] Aug 3, 2023
3105fef
Rename “read” database to “replica” for consistency (#26326)
ClearlyClaire Aug 3, 2023
912bc46
Update dependency selenium-webdriver to v4.10.0 (#26322)
renovate[bot] Aug 3, 2023
a5768d3
Update dependency rack-attack to v6.7.0 (#26319)
renovate[bot] Aug 3, 2023
120f580
Add direct link to the Single-Sign On provider if there is only one s…
CSDUMMI Aug 3, 2023
12c43e4
Re-add StatsD support through the `nsa` gem (#26310)
ClearlyClaire Aug 3, 2023
9d719bc
Change reblogs to be excluded from "Posts and replies" tab in web UI …
Gargron Aug 3, 2023
04e7efa
Change design of hidden media overlay (again) in web UI (#26330)
Gargron Aug 3, 2023
9405e9a
Fix incorrect model annotation for List#exclusive (#26313)
ClearlyClaire Aug 4, 2023
93372fe
Fix light theme select option for hashtags (#26311)
Aug 4, 2023
b59053f
Fix confirmation when closing media edition modal with unsaved change…
ClearlyClaire Aug 4, 2023
65096c1
Change streaming `/metrics` to include additional metrics (#26299)
ThisIsMissEm Aug 4, 2023
d5bee37
Fix missing cached preview cards attributes (#26343)
ClearlyClaire Aug 4, 2023
79936c5
Fix report modal secondary buttons style (#26341)
ClearlyClaire Aug 4, 2023
e325443
Change header of hashtag timelines in web UI (#26362)
Gargron Aug 7, 2023
d2dbaba
New Crowdin Translations (automated) (#26209)
github-actions[bot] Aug 7, 2023
11f5a8e
Make mastodon-streaming systemd unit templated (#24751)
e-nomem Aug 7, 2023
c363978
Spec media attachment speedups (#25416)
mjankowski Aug 7, 2023
cd6f2b3
Fix interaction modal layout (#26368)
ClearlyClaire Aug 7, 2023
30c64bf
Fix list import concurrently creating lists of the same name (#26372)
ClearlyClaire Aug 7, 2023
60fbb0f
Omniauth 2.0 version bump (#24209)
mjankowski Aug 8, 2023
72423bc
Change account search tokenizer and queries (#26378)
Gargron Aug 8, 2023
0e2a4d3
Fix adding column with default value taking longer on Postgres >= 11 …
Gargron Aug 8, 2023
4773d7b
Fix `preview_cards_statuses_pkey` not being reindexed concurrently (#…
ClearlyClaire Aug 8, 2023
2c204d9
Change `DB_REPLICA_*` environment variables to `REPLICA_DB_*` (#26386)
ClearlyClaire Aug 8, 2023
8b37dd2
Fix Content Security Policy sometimes unnecessarily allowing hCaptcha…
ClearlyClaire Aug 8, 2023
dab54cc
Prepare v4.2.0-beta1 (#26339)
ClearlyClaire Aug 8, 2023
b12d75e
Fix blocking subdomains of an already-blocked domain (#26392)
ClearlyClaire Aug 9, 2023
271d384
Use migration classes in migrations where current definition conflict…
mjankowski Aug 9, 2023
2c88364
Restore console behavior in `test` env (#26401)
mjankowski Aug 9, 2023
405f141
Change: Block GPTBot (#26396)
Foritus Aug 9, 2023
d9a9323
Avoid connecting to a running ES instance in ES search check spec (#2…
mjankowski Aug 9, 2023
4caa9f0
Change the hashtag column to not display the hashtag header on pinned…
ClearlyClaire Aug 9, 2023
59678c6
Update dependency sass to v1.64.2 (#26315)
renovate[bot] Aug 9, 2023
26fa4a6
Update eslint (non-major) (#26323)
renovate[bot] Aug 9, 2023
8cbf4a5
New Crowdin Translations (automated) (#26373)
github-actions[bot] Aug 10, 2023
426ca4f
Update dependency aws-sdk-s3 to v1.132.1 (#26423)
renovate[bot] Aug 10, 2023
74c422a
Update dependency immutable to v4.3.2 (#26425)
renovate[bot] Aug 10, 2023
65f56bd
Update dependency haml_lint to v0.49.3 (#26424)
renovate[bot] Aug 10, 2023
c645308
Update dependency eslint-config-prettier to v9 (#26434)
renovate[bot] Aug 10, 2023
ba318a4
Update dependency sass to v1.65.1 (#26433)
renovate[bot] Aug 10, 2023
43741ba
Update dependency mime-types to '~> 3.5.0' (#26431)
renovate[bot] Aug 10, 2023
54dfaca
Update dependency regenerator-runtime to ^0.14.0 (#26432)
renovate[bot] Aug 10, 2023
1a308d1
Update dependency rails to v7.0.7 (#26428)
renovate[bot] Aug 10, 2023
700f948
Update dependency @rails/ujs to v7.0.7 (#26422)
renovate[bot] Aug 10, 2023
05022c9
Update dependency pg to v8.11.2 (#26426)
renovate[bot] Aug 10, 2023
7572fa2
Update babel monorepo to v7.22.10 (#26421)
renovate[bot] Aug 10, 2023
27d8e9b
Update dependency eslint-import-resolver-typescript to v3.6.0 (#26429)
renovate[bot] Aug 10, 2023
3dd3c50
Update dependency pg-connection-string to v2.6.2 (#26427)
renovate[bot] Aug 10, 2023
4bc0dd7
Add `S3_DISABLE_CHECKSUM_MODE` environment variable for compatibility…
ClearlyClaire Aug 10, 2023
9dff838
Merge duplicate Gemfile groups (#26441)
nschonni Aug 10, 2023
121443c
Upgrade JS dev dependencies (#26442)
renchap Aug 11, 2023
34f3001
Fix reply not preserving the language from the replied-to post (#26452)
ClearlyClaire Aug 11, 2023
496eb6f
Add missing instances option to tootctl search deploy (#26461)
tribela Aug 13, 2023
8c7f3c5
Remove old non-unique index on preview_cards statuses join table (#26…
ClearlyClaire Aug 14, 2023
1eac3a6
Upgrade `@types/react` (#26457)
renchap Aug 14, 2023
a664e15
Fix "Create Account" button in interaction modal (#26459)
mgmn Aug 14, 2023
c48506d
Improve Renovate configuration (#26306)
HonkingGoose Aug 14, 2023
273730c
Update dependency faker to v3.2.1 (#26474)
renovate[bot] Aug 14, 2023
c65032f
Update dependency autoprefixer to v10.4.15 (#26473)
renovate[bot] Aug 14, 2023
07f43da
Update dependency nokogiri to v1.15.4 (#26476)
renovate[bot] Aug 14, 2023
9262cfc
Fix `lint:json` not processing `json5` extension (#26481)
renchap Aug 14, 2023
c452ccd
New Crowdin Translations (automated) (#26444)
github-actions[bot] Aug 14, 2023
f5778ca
Add `ES_PRESET` option to customize numbers of shards and replicas (#…
ClearlyClaire Aug 14, 2023
3a8370e
Fix `repo:changelog` task matching strings that are not Pull Request …
ClearlyClaire Aug 14, 2023
fc5ab2d
Add privacy tab in profile settings (#26484)
ClearlyClaire Aug 14, 2023
90ec88d
Add support for `indexable` attribute on remote actors (#26485)
ClearlyClaire Aug 14, 2023
dd049fc
Fix ES_PRESET not being applied to Chewy's internal index (#26489)
ClearlyClaire Aug 14, 2023
d9c2129
Fix unfollow icon styling in advanced column (#26482)
ClearlyClaire Aug 14, 2023
df6e719
Add display of out-of-band hashtags in the web interface (#26492)
ClearlyClaire Aug 14, 2023
85ecadb
Fix hashtag bar display when status is in a thread (#26497)
arbolitoloco1 Aug 16, 2023
26eaf05
Update dependency postcss to v8.4.28 (#26502)
renovate[bot] Aug 16, 2023
f0862bc
Fix hashtag bar sometimes including tags that appear in the post's bo…
ClearlyClaire Aug 16, 2023
0446394
Fix “legal” report category not showing up in moderation interface (#…
ClearlyClaire Aug 16, 2023
cc4560d
Change “privacy and reach” settings so that unchecking boxes always i…
ClearlyClaire Aug 17, 2023
3ed2bf9
Fix case-insensitive comparison of hashtags to do case-folding (#26525)
ClearlyClaire Aug 17, 2023
60b9fa6
Fix cached posts including stale stats (#26409)
ClearlyClaire Aug 17, 2023
b5acf13
Update dependency pg to v8.11.3 (#26519)
renovate[bot] Aug 17, 2023
b95867a
Allow setting a custom HTTP method in CacheBuster (#26528)
renchap Aug 18, 2023
13ffe91
Fix `frame_rate` for videos where `ffprobe` reports 0/0 (#26500)
NicolaiSoeborg Aug 18, 2023
581ebf2
Update dependency puma to v6.3.1 (#26537)
renovate[bot] Aug 18, 2023
1cb978b
Update dependency @material-design-icons/svg to v0.14.11 (#26536)
renovate[bot] Aug 18, 2023
bb51c06
Remove redundant ready() wrapper (#26533)
c960657 Aug 18, 2023
6375e39
Fix: support both DATABASE_URL and DB_PASS (#26295)
ThisIsMissEm Aug 18, 2023
e7bea8f
Fix already initialized constant warning (#26542)
ClearlyClaire Aug 18, 2023
ee702e3
Change follow recommendation materialized view to be faster in most c…
ClearlyClaire Aug 18, 2023
bb23116
Fix profile picture preview (#26538)
c960657 Aug 18, 2023
d24a87c
Add ability to delete avatar or header picture via the API (#25124)
danielmbrasil Aug 21, 2023
872fe2d
Do not start LibreTranslate and Elasticsearch on GitHub Codespaces (#…
c960657 Aug 21, 2023
d3b4422
Update dependency core-js to v3.32.1 (#26548)
renovate[bot] Aug 21, 2023
1cdcd9d
Update eslint (non-major) (#26567)
renovate[bot] Aug 21, 2023
191d302
Refactor `Api::V1::ProfilesController` into two separate controllers …
ClearlyClaire Aug 21, 2023
9ed0c91
Add auto-refresh of accounts we get new messages/edits of (#26510)
ClearlyClaire Aug 21, 2023
ac0eb05
Add Elasticsearch cluster health check and indexes mismatch check to …
ClearlyClaire Aug 21, 2023
061fd66
Remove hashtags from the last line of a status if it only contains ha…
renchap Aug 21, 2023
facfec1
Bump version to v4.2.0-beta2 (#26579)
ClearlyClaire Aug 21, 2023
fe31571
Fix layout of the closed registrations modal (#26593)
ClearlyClaire Aug 22, 2023
b970ed6
Update rubocop and rubocop-rspec (#26329)
nschonni Aug 22, 2023
bb2db2a
Add `circular-dependency-plugin` to detect any circular deps issues (…
renchap Aug 22, 2023
3249c06
Update `SECURITY.md` to indicate issues can be reported on Github (#2…
renchap Aug 22, 2023
dc09c10
Update dependency mime-types to v3.5.1 (#26595)
renovate[bot] Aug 22, 2023
c01ecd0
Add cherokee to languages dropdown (#26012)
gunchleoc Aug 22, 2023
25dc016
Add Kalmyk to languages dropdown (#26013)
gunchleoc Aug 22, 2023
bd023a2
Fix admin dashboard check when using Elasticsearch with `ES_PREFIX` (…
ClearlyClaire Aug 22, 2023
58acaa9
Better hashtag normalization when processing a post (#26614)
renchap Aug 23, 2023
74b8b8e
Update dependency rails to v7.0.7.2 (#26612)
renovate[bot] Aug 23, 2023
ea1a221
Update dependency react-textarea-autosize to v8.5.3 (#26607)
renovate[bot] Aug 23, 2023
cf6f707
Add support for federating `memorial` attribute (#26583)
rrgeorge Aug 23, 2023
3aac129
Fix unexpected audio stream transcoding when uploaded video is eligib…
yufushiro Aug 23, 2023
8505786
Update Account Search to prioritize username over display name (#26623)
jsgoldstein Aug 23, 2023
44ba785
Change the hashtag bar to be hidden when there is a CW and the post i…
renchap Aug 23, 2023
152b10b
Fix some React warnings (#26609)
c960657 Aug 23, 2023
613cfd6
Change hashtag bar tags to be de-emphasized (#26606)
ClearlyClaire Aug 23, 2023
de8c242
Update dependency immutable to v4.3.3 (#26622)
renovate[bot] Aug 23, 2023
060b554
Update dependency oj to v3.16.0 (#26520)
renovate[bot] Aug 23, 2023
34f5b90
Update dependency sass to v1.66.1 (#26534)
renovate[bot] Aug 23, 2023
b91724f
Add elastic search installation into Vagrantfile (#26512)
jsgoldstein Aug 23, 2023
f337008
Fix timeout on invalid set of exclusionary parameters in `/api/v1/tim…
danielmbrasil Aug 23, 2023
9a8190d
Change opacity of the delete icon in the search field to be more visi…
AntoninDelFabbro Aug 23, 2023
e3fd071
Update dependency rspec-sidekiq to v4 (#26627)
renovate[bot] Aug 24, 2023
9974163
Consolidate inclusion of `admin` js pack link (#26628)
mjankowski Aug 24, 2023
24ea6f8
Update dependency redis to v4.6.8 (#26630)
renovate[bot] Aug 24, 2023
2dbbeed
Fix: Workaround to load MASTODON_VERSION_* in Docker. (#26591)
sinoru Aug 24, 2023
b2ac93d
Fix selecting domains to forward reports to not passing the informati…
ClearlyClaire Aug 24, 2023
e90649b
Fix clicking “Explore” or “Live feeds” column headers to scroll in ad…
ClearlyClaire Aug 24, 2023
163b004
Change admin e-mail notification settins to be their own settings gro…
ClearlyClaire Aug 24, 2023
96bcee6
Change nightlies versioning from `v4.2.0+2023-08-23` to `v4.2.0-night…
ClearlyClaire Aug 24, 2023
30c191a
Add new public status index (#26344)
jsgoldstein Aug 24, 2023
389b7d2
Fix changelog wording and missing items (#26638)
ClearlyClaire Aug 24, 2023
c66f756
Update babel monorepo to v7.22.11 (#26640)
renovate[bot] Aug 25, 2023
c3a42e1
Add `data-nosnippet` attribute to remote posts and local posts with `…
ClearlyClaire Aug 25, 2023
e3825a1
Add PublicStatusesCheck to Elasticsearch index check on admin dashboa…
ClearlyClaire Aug 25, 2023
f2ec287
Add Elasticsearch/OpenSearch version to “Software” in admin dashboard…
ClearlyClaire Aug 25, 2023
82ec6f1
Fix statuses search Elasticsearch query (#26657)
ClearlyClaire Aug 25, 2023
e4c0ce1
Update dependency immutable to v4.3.4 (#26655)
renovate[bot] Aug 25, 2023
8e8747c
Update ordering to use `id` from body of document instead of deprecat…
jsgoldstein Aug 25, 2023
0721128
Fix dashboard check for Elasticsearch suggested command including inc…
ClearlyClaire Aug 25, 2023
f398474
Change the pre-release versioning scheme and associated environment v…
ClearlyClaire Aug 25, 2023
7164176
Fix toast saying "published" instead of "saved" after editing post in…
Gargron Aug 25, 2023
925c16a
Fix nightly build version (#26676)
ClearlyClaire Aug 26, 2023
f8d2fea
Change queue of job when opting into search from `default` to `pull` …
Gargron Aug 27, 2023
5694e24
Fix unnecessary condition causing seqscan when indexing (#26689)
Gargron Aug 27, 2023
e263db2
Change indexing jobs to use database replica (#26692)
Gargron Aug 27, 2023
fc14d1f
Update eslint (non-major) (#26694)
renovate[bot] Aug 28, 2023
822a35b
Fix not being able to negate prefix clauses in search (#26672)
Gargron Aug 28, 2023
b42fe5e
Update dependency haml_lint to v0.50.0 (#26665)
renovate[bot] Aug 28, 2023
4ea5db9
Update DefinitelyTyped types (non-major) (#26693)
renovate[bot] Aug 28, 2023
7bd5ebb
Fix multiple issues with status index mappings (#26686)
Gargron Aug 28, 2023
9d9de8d
Update dependency @testing-library/jest-dom to v6 (#26479)
renovate[bot] Aug 28, 2023
67166de
Add `from:me` syntax to search (#26660)
Gargron Aug 28, 2023
bceb893
Add search options to search popout in web UI (#26662)
Gargron Aug 28, 2023
0cce7fb
Fix incorrect call to `PublicStatusesIndex.import` (#26697)
ClearlyClaire Aug 28, 2023
d3d9807
A first pass at adding some basic ES tests
jsgoldstein Aug 28, 2023
ee61796
Add more tests
jsgoldstein Aug 28, 2023
0452165
Merge branch 'jake_main' into add_basic_es_tests
jsgoldstein Aug 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .bundler-audit.yml

This file was deleted.

16 changes: 7 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
// For more details, see https://aka.ms/devcontainer.json.
{
"name": "Mastodon",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/sshd:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or the host.
"runServices": ["app", "db", "redis"],

"forwardPorts": [3000, 4000],

// Use 'postCreateCommand' to run commands after the container is created.
"containerEnv": {
"ES_ENABLED": "",
"LIBRE_TRANSLATE_ENDPOINT": ""
},

"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"postCreateCommand": ".devcontainer/post-create.sh",
"waitFor": "postCreateCommand",

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": ["EditorConfig.EditorConfig", "webben.browserslist"]
}
}
Expand Down
29 changes: 15 additions & 14 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:base',
':dependencyDashboard',
'config:recommended',
':labels(dependencies)',
':maintainLockFilesMonthly', // update non-direct dependencies monthly
':prConcurrentLimit10', // only 10 open PRs at the same time
':prConcurrentLimitNone', // Remove limit for open PRs at any time.
':prHourlyLimit2', // Rate limit PR creation to a maximum of two per hour.
],
stabilityDays: 3, // Wait 3 days after the package has been published before upgrading it
minimumReleaseAge: '3', // Wait 3 days after the package has been published before upgrading it
// packageRules order is important, they are applied from top to bottom and are merged,
// meaning the most important ones must be at the bottom, for example grouping rules
// If we do not want a package to be grouped with others, we need to set its groupName
// to `null` after any other rule set it to something.
dependencyDashboardHeader: 'This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more. Before approving any upgrade: read the description and comments in the [`renovate.json5` file](https://github.com/mastodon/mastodon/blob/main/.github/renovate.json5).',
packageRules: [
{
// Ignore major version bumps for these node packages
// Require Dependency Dashboard Approval for major version bumps of these node packages
matchManagers: ['npm'],
matchPackageNames: [
'tesseract.js', // Requires code changes
Expand All @@ -41,10 +42,10 @@
'react-router-dom',
],
matchUpdateTypes: ['major'],
enabled: false,
dependencyDashboardApproval: true,
},
{
// Ignore major version bumps for these Ruby packages
// Require Dependency Dashboard Approval for major version bumps of these Ruby packages
matchManagers: ['bundler'],
matchPackageNames: [
'rack', // Needs to be synced with Rails version
Expand All @@ -55,33 +56,33 @@
'redis', // Requires manual upgrade and sync with Sidekiq version
],
matchUpdateTypes: ['major'],
enabled: false,
dependencyDashboardApproval: true,
},
{
// Update Github Actions and Docker images weekly
matchManagers: ['github-actions', 'dockerfile', 'docker-compose'],
extends: ['schedule:weekly'],
},
{
// Ignore major & minor bumps for the ruby image, this needs to be synced with .ruby-version
// Require Dependency Dashboard Approval for major & minor bumps for the ruby image, this needs to be synced with .ruby-version
matchManagers: ['dockerfile'],
matchPackageNames: ['moritzheiber/ruby-jemalloc'],
matchUpdateTypes: ['minor', 'major'],
enabled: false,
dependencyDashboardApproval: true,
},
{
// Ignore major bump for the node image, this needs to be synced with .nvmrc
// Require Dependency Dashboard Approval for major bumps for the node image, this needs to be synced with .nvmrc
matchManagers: ['dockerfile'],
matchPackageNames: ['node'],
matchUpdateTypes: ['major'],
enabled: false,
dependencyDashboardApproval: true,
},
{
// Ignore major postgres bumps in the docker-compose file, as those break dev environments
// Require Dependency Dashboard Approval for major postgres bumps in the docker-compose file, as those break dev environments
matchManagers: ['docker-compose'],
matchPackageNames: ['postgres'],
matchUpdateTypes: ['major'],
enabled: false,
dependencyDashboardApproval: true,
},
{
// Update devDependencies every week, with one grouped PR
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/build-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
type: boolean
push_to_images:
type: string
version_suffix:
version_prerelease:
type: string
version_metadata:
type: string
flavor:
type: string
Expand Down Expand Up @@ -83,7 +85,9 @@ jobs:
- uses: docker/build-push-action@v4
with:
context: .
build-args: MASTODON_VERSION_SUFFIX=${{ inputs.version_suffix }}
build-args: |
MASTODON_VERSION_PRERELEASE=${{ inputs.version_prerelease }}
MASTODON_VERSION_METADATA=${{ inputs.version_metadata }}
platforms: ${{ inputs.platforms }}
provenance: false
builder: ${{ steps.buildx.outputs.name || steps.buildx-native.outputs.name }}
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
env:
TZ: Etc/UTC
run: |
echo mastodon_version_suffix=nightly-$(date +'%Y-%m-%d')>> $GITHUB_OUTPUT
echo mastodon_version_prerelease=nightly.$(date +'%Y-%m-%d')>> $GITHUB_OUTPUT
outputs:
suffix: ${{ steps.version_vars.outputs.mastodon_version_suffix }}
prerelease: ${{ steps.version_vars.outputs.mastodon_version_prerelease }}

build-image:
needs: compute-suffix
Expand All @@ -29,14 +29,13 @@ jobs:
push_to_images: |
tootsuite/mastodon
ghcr.io/mastodon/mastodon
# The `+` is important here, result will be v4.1.2+nightly-2022-03-05
version_suffix: +${{ needs.compute-suffix.outputs.suffix }}
version_prerelease: ${{ needs.compute-suffix.outputs.prerelease }}
labels: |
org.opencontainers.image.description=Nightly build image used for testing purposes
flavor: |
latest=auto
tags: |
type=raw,value=edge
type=raw,value=nightly
type=schedule,pattern=${{ needs.compute-suffix.outputs.suffix }}
type=schedule,pattern=${{ needs.compute-suffix.outputs.prerelease }}
secrets: inherit
6 changes: 3 additions & 3 deletions .github/workflows/build-push-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
uses: actions/checkout@v3
- id: version_vars
run: |
echo mastodon_version_suffix=+pr-${{ github.event.pull_request.number }}-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
echo mastodon_version_metadata=pr-${{ github.event.pull_request.number }}-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
outputs:
suffix: ${{ steps.version_vars.outputs.mastodon_version_suffix }}
metadata: ${{ steps.version_vars.outputs.mastodon_version_metadata }}

build-image:
needs: compute-suffix
Expand All @@ -33,7 +33,7 @@ jobs:
use_native_arm64_builder: true
push_to_images: |
ghcr.io/mastodon/mastodon
version_suffix: ${{ needs.compute-suffix.outputs.suffix }}
version_metadata: ${{ needs.compute-suffix.outputs.metadata }}
flavor: |
latest=auto
tags: |
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/test-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,100 @@ jobs:
run: './bin/rails db:create db:schema:load db:seed'

- run: bundle exec rake rspec_chunked

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
--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: true
RAILS_ENV: test
BUNDLE_WITH: test

strategy:
fail-fast: false
matrix:
ruby-version:
- '3.0'
- '3.1'
- '.ruby-version'

steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
path: './public'
name: ${{ github.sha }}

- name: Update package index
run: sudo apt-get update

- name: Set up Node.js
uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: '.nvmrc'

- name: Install native Ruby dependencies
run: sudo apt-get install -y libicu-dev libidn11-dev

- name: Install additional system dependencies
run: sudo apt-get install -y ffmpeg imagemagick

- name: Set up bundler cache
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version}}
bundler-cache: true

- run: yarn --frozen-lockfile

- name: Load database schema
run: './bin/rails db:create db:schema:load db:seed'

- run: bundle exec rake spec:system

- name: Archive logs
uses: actions/upload-artifact@v3
if: failure()
with:
name: e2e-logs-${{ matrix.ruby-version }}
path: log/

- name: Archive test screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: e2e-screenshots
path: tmp/screenshots/
9 changes: 1 addition & 8 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,7 @@ Layout/FirstHashElementIndentation:
# Reason: Currently disabled in .rubocop_todo.yml
# https://docs.rubocop.org/rubocop/cops_layout.html#layoutlinelength
Layout/LineLength:
AllowedPatterns:
# Allow comments to be long lines
- !ruby/regexp / \# .*$/
- !ruby/regexp /^\# .*$/
Exclude:
- 'lib/mastodon/cli/*.rb'
- db/*migrate/**/*
- db/seeds/**/*
Max: 320 # Default of 120 causes a duplicate entry in generated todo file

# Reason:
# https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessaccessmodifier
Expand Down
Loading