Skip to content

Commit

Permalink
Merge pull request #759 from kmycode/upstream-20240618
Browse files Browse the repository at this point in the history
Upstream 20240618
  • Loading branch information
kmycode authored Jun 17, 2024
2 parents 3d0f569 + aa2cdc8 commit bdea47d
Show file tree
Hide file tree
Showing 271 changed files with 1,843 additions and 1,401 deletions.
8 changes: 0 additions & 8 deletions .bundler-audit.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ module.exports = defineConfig({
// Disable formatting rules that have been enabled in the base config
'indent': 'off',

// This is not needed as we use noImplicitReturns, which handles this in addition to understanding types
'consistent-return': 'off',

'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],

'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
Expand Down
1 change: 1 addition & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:recommended',
'customManagers:dockerfileVersions',
':labels(dependencies)',
':prConcurrentLimitNone', // Remove limit for open PRs at any time.
':prHourlyLimit2', // Rate limit PR creation to a maximum of two per hour.
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/bundler-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ on:
paths:
- 'Gemfile*'
- '.ruby-version'
- '.bundler-audit.yml'
- '.github/workflows/bundler-audit.yml'

pull_request:
paths:
- 'Gemfile*'
- '.ruby-version'
- '.bundler-audit.yml'
- '.github/workflows/bundler-audit.yml'

schedule:
Expand All @@ -23,12 +21,17 @@ jobs:
security:
runs-on: ubuntu-latest

env:
BUNDLE_ONLY: development

steps:
- name: Clone repository
uses: actions/checkout@v4

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

- name: Run bundler-audit
run: bundle exec bundler-audit
run: bundle exec bundler-audit check --update
10 changes: 8 additions & 2 deletions .github/workflows/lint-haml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ on:
jobs:
lint:
runs-on: ubuntu-latest

env:
BUNDLE_ONLY: development

steps:
- name: Clone repository
uses: actions/checkout@v4

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

- name: Run haml-lint
run: |
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/lint-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,24 @@ jobs:
lint:
runs-on: ubuntu-latest

env:
BUNDLE_ONLY: development

steps:
- name: Clone repository
uses: actions/checkout@v4

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

- name: Set-up RuboCop Problem Matcher
uses: r7kamura/rubocop-problem-matchers-action@v1

- name: Run rubocop
run: bundle exec rubocop
run: bin/rubocop

- name: Run brakeman
if: always() # Run both checks, even if the first failed
run: bundle exec brakeman
run: bin/brakeman
2 changes: 1 addition & 1 deletion .github/workflows/rebase-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Check for merge conflicts
uses: eps1lon/actions-label-merge-conflict@releases/2.x
uses: eps1lon/actions-label-merge-conflict@v3
with:
dirtyLabel: 'rebase needed :construction:'
repoToken: '${{ secrets.GITHUB_TOKEN }}'
Expand Down
95 changes: 0 additions & 95 deletions .github/workflows/test-migrations-two-step.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Test one step migrations
name: Historical data migration test

on:
push:
branches-ignore:
Expand All @@ -17,7 +18,7 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
paths: '["Gemfile*", ".ruby-version", "**/*.rb", ".github/workflows/test-migrations-one-step.yml", "lib/tasks/tests.rake"]'
paths: '["Gemfile*", ".ruby-version", "**/*.rb", ".github/workflows/test-migrations.yml", "lib/tasks/tests.rake"]'

test:
runs-on: ubuntu-latest
Expand All @@ -40,32 +41,31 @@ jobs:
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 5432:5432

redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-interval 10ms
--health-timeout 3s
--health-retries 50
ports:
- 6379:6379

env:
CONTINUOUS_INTEGRATION: true
DB_HOST: localhost
DB_USER: postgres
DB_PASS: postgres
DISABLE_SIMPLECOV: true
RAILS_ENV: test
BUNDLE_CLEAN: true
BUNDLE_FROZEN: true
BUNDLE_WITHOUT: 'development production'
BUNDLE_WITHOUT: 'development:production'
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3

Expand All @@ -75,14 +75,19 @@ jobs:
- name: Set up Ruby environment
uses: ./.github/actions/setup-ruby

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

- name: Run historical migrations with data population
run: './bin/rails tests:migrations:prepare_database'

- name: Run all remaining migrations
run: './bin/rails db:migrate'
- name: Test "one step migration" flow
run: |
bin/rails db:drop
bin/rails db:create
bin/rails tests:migrations:prepare_database
bin/rails db:migrate
bin/rails tests:migrations:check_database
- name: Check migration result
run: './bin/rails tests:migrations:check_database'
- name: Test "two step migration" flow
run: |
bin/rails db:drop
bin/rails db:create
SKIP_POST_DEPLOYMENT_MIGRATIONS=true bin/rails tests:migrations:prepare_database
SKIP_POST_DEPLOYMENT_MIGRATIONS=true bin/rails db:migrate
bin/rails db:migrate
bin/rails tests:migrations:check_database
Loading

0 comments on commit bdea47d

Please sign in to comment.