Skip to content

Commit

Permalink
Merge pull request glitch-soc#2449 from ClearlyClaire/glitch-soc/merg…
Browse files Browse the repository at this point in the history
…e-upstream

Merge upstream changes up to 9a3d047
  • Loading branch information
ClearlyClaire authored Oct 27, 2023
2 parents 18eacc7 + 36c8570 commit 59893a4
Show file tree
Hide file tree
Showing 425 changed files with 4,678 additions and 5,846 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ module.exports = {
},
// Common React utilities
{
pattern: '{classnames,react-helmet,react-router-dom}',
pattern: '{classnames,react-helmet,react-router,react-router-dom}',
group: 'external',
position: 'before',
},
Expand Down
19 changes: 19 additions & 0 deletions .github/actions/setup-javascript/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Setup Javascript'
description: 'Setup a Javascript environment ready to run the Mastodon code'
inputs:
onlyProduction:
description: Only install production dependencies
default: 'false'

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

- name: Install all yarn packages
shell: bash
run: yarn --frozen-lockfile ${{ inputs.onlyProduction != 'false' && '--production' || '' }}
23 changes: 23 additions & 0 deletions .github/actions/setup-ruby/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Setup RUby'
description: 'Setup a Ruby environment ready to run the Mastodon code'
inputs:
ruby-version:
description: The Ruby version to install
default: '.ruby-version'
additional-system-dependencies:
description: 'Additional packages to install'

runs:
using: 'composite'
steps:
- name: Install system dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev ${{ inputs.additional-system-dependencies }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
bundler-cache: true
1 change: 0 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
extends: [
'config:recommended',
':labels(dependencies)',
':maintainLockFilesMonthly', // update non-direct dependencies monthly
':prConcurrentLimitNone', // Remove limit for open PRs at any time.
':prHourlyLimit2', // Rate limit PR creation to a maximum of two per hour.
],
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/bundler-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4

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

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby

- name: Run bundler-audit
run: bundle exec bundler-audit
24 changes: 5 additions & 19 deletions .github/workflows/check-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true

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

- name: Install all yarn packages
run: yarn --frozen-lockfile
- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby

- name: Set up Javascript environment
uses: ./.github/actions/setup-javascript

- name: Check for missing strings in English JSON
run: |
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/crowdin-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,8 @@ jobs:
run: sudo chown -R runner:docker .

# This is needed to run the normalize step
- name: Install native Ruby dependencies
run: sudo apt-get install -y libicu-dev libidn11-dev

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby

- name: Run i18n normalize task
run: bundle exec i18n-tasks normalize
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/lint-css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,8 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4

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

- name: Install all yarn packages
run: yarn --frozen-lockfile
- name: Set up Javascript environment
uses: ./.github/actions/setup-javascript

- uses: xt0rted/stylelint-problem-matcher@v1

Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/lint-haml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,8 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4

- name: Install native Ruby dependencies
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby

- name: Run haml-lint
run: |
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/lint-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,8 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4

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

- name: Install all yarn packages
run: yarn --frozen-lockfile
- name: Set up Javascript environment
uses: ./.github/actions/setup-javascript

- name: ESLint
run: yarn lint:js --max-warnings 0
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/lint-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,8 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4

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

- name: Install all yarn packages
run: yarn --frozen-lockfile
- name: Set up Javascript environment
uses: ./.github/actions/setup-javascript

- name: Prettier
run: yarn lint:json
10 changes: 2 additions & 8 deletions .github/workflows/lint-md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,8 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4

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

- name: Install all yarn packages
run: yarn --frozen-lockfile
- name: Set up Javascript environment
uses: ./.github/actions/setup-javascript

- name: Prettier
run: yarn lint:md
10 changes: 2 additions & 8 deletions .github/workflows/lint-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,8 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4

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

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby

- name: Set-up RuboCop Problem Matcher
uses: r7kamura/rubocop-problem-matchers-action@v1
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/lint-yml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,8 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4

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

- name: Install all yarn packages
run: yarn --frozen-lockfile
- name: Set up Javascript environment
uses: ./.github/actions/setup-javascript

- name: Prettier
run: yarn lint:yml
10 changes: 2 additions & 8 deletions .github/workflows/test-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,8 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4

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

- name: Install all yarn packages
run: yarn --frozen-lockfile
- name: Set up Javascript environment
uses: ./.github/actions/setup-javascript

- name: Jest testing
run: yarn jest --reporters github-actions summary
12 changes: 2 additions & 10 deletions .github/workflows/test-migrations-one-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install native Ruby dependencies
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev
- name: Set up bundler cache
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby

- name: Create database
run: './bin/rails db:create'
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/test-migrations-two-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install native Ruby dependencies
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev
- name: Set up bundler cache
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby

- name: Create database
run: './bin/rails db:create'
Expand Down
Loading

0 comments on commit 59893a4

Please sign in to comment.