Skip to content

Commit d25aa6b

Browse files
committed
Merge remote-tracking branch 'origin/main' into issue/3536
2 parents d9961b8 + 1968be9 commit d25aa6b

492 files changed

Lines changed: 23570 additions & 16275 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
12+
# Matches multiple files with brace expansion notation
13+
# Set default charset
14+
[*.{js,scss,rb,erb}]
15+
charset = utf-8
16+
indent_style = space
17+
indent_size = 2

.env.mysql2

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# DMPRoadmap dotenv file
2+
3+
# Rails log level
4+
RAILS_LOG_LEVEL=debug
5+
# Whether or not Rails should log to STDOUT. If false it will log to `./logs/[env].log`
6+
RAILS_LOG_TO_STDOUT=true
7+
# Whether or not Rails will be serving your static assets
8+
RAILS_SERVE_STATIC_FILES=false
9+
# Maximum number of Puma threads
10+
RAILS_MAX_THREADS=5
11+
# Maximum number of Puma workers
12+
WEB_CONCURRENCY=2
13+
# The port puma will use to host the Rails app
14+
PORT=3000
15+
16+
# Rails 6.1+ has a white-list of valid domains. You must set this for your production env!
17+
DMPROADMAP_HOST=localhost
18+
19+
# The location of the wkhtmltopdf app. Once bundler has installed it, you can find it with
20+
# `which wkhtmltopdf` on linux/osx systems.
21+
WICKED_PDF_PATH=/usr/local/bin/wkhtmltopdf
22+
23+
# Database settings.
24+
DB_ADAPTER=mysql2
25+
DB_HOST=localhost
26+
DB_PORT=3306
27+
DB_POOL_SIZE=16
28+
DB_NAME=roadmap
29+
30+
# Whether or not the Dragonfly gem should use AWS S3 to store logos. If 'false' the logos will
31+
# be stored on the local disk. If true, you must provide the `AWS_` prefixed values.
32+
DRAGONFLY_AWS=false
33+
AWS_REGION=
34+
AWS_BUCKET_NAME=
35+
36+
# If you have a Rollbar account and want to redcord errors there, add your token here
37+
ROLLBAR_ACCESS_TOKEN=
38+
ROLLBAR_ENV=
39+
40+
# Translation IO variables. The Domain can be either `app` or `client` and is typically defined
41+
# when running `bin/rails translations:sync DOMAIN=app`. `client` will use any of your
42+
# customized content in ./app/views/branded and `app` is for the core roadmap translations.
43+
# Include your Translation.io API key for the appropriate domains:
44+
# app => TRANSLATION_API_ROADMAP
45+
# client => TRANSLATION_API_CLIENT
46+
# DOMAIN=app
47+
# TRANSLATION_API_ROADMAP=
48+
# TRANSLATION_API_CLIENT=

.env.postgresql

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# DMPRoadmap dotenv file
2+
3+
# Rails log level
4+
RAILS_LOG_LEVEL=debug
5+
# Whether or not Rails should log to STDOUT. If false it will log to `./logs/[env].log`
6+
RAILS_LOG_TO_STDOUT=true
7+
# Whether or not Rails will be serving your static assets
8+
RAILS_SERVE_STATIC_FILES=false
9+
# Maximum number of Puma threads
10+
RAILS_MAX_THREADS=5
11+
# Maximum number of Puma workers
12+
WEB_CONCURRENCY=2
13+
# The port puma will use to host the Rails app
14+
PORT=3000
15+
16+
# Rails 6.1+ has a white-list of valid domains. You must set this for your production env!
17+
DMPROADMAP_HOST=localhost
18+
19+
# The location of the wkhtmltopdf app. Once bundler has installed it, you can find it with
20+
# `which wkhtmltopdf` on linux/osx systems.
21+
WICKED_PDF_PATH=/usr/local/bin/wkhtmltopdf
22+
23+
# Database settings.
24+
DB_ADAPTER=postgresql
25+
DB_HOST=localhost
26+
DB_PORT=5432
27+
DB_POOL_SIZE=16
28+
DB_NAME=roadmap
29+
30+
# Whether or not the Dragonfly gem should use AWS S3 to store logos. If 'false' the logos will
31+
# be stored on the local disk. If true, you must provide the `AWS_` prefixed values.
32+
DRAGONFLY_AWS=false
33+
AWS_REGION=
34+
AWS_BUCKET_NAME=
35+
36+
# If you have a Rollbar account and want to redcord errors there, add your token here
37+
ROLLBAR_ACCESS_TOKEN=
38+
ROLLBAR_ENV=
39+
40+
# Translation IO variables. The Domain can be either `app` or `client` and is typically defined
41+
# when running `bin/rails translations:sync DOMAIN=app`. `client` will use any of your
42+
# customized content in ./app/views/branded and `app` is for the core roadmap translations.
43+
# Include your Translation.io API key for the appropriate domains:
44+
# app => TRANSLATION_API_ROADMAP
45+
# client => TRANSLATION_API_CLIENT
46+
DOMAIN=app
47+
TRANSLATION_API_ROADMAP=
48+
TRANSLATION_API_CLIENT=

.github/workflows/brakeman.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
brakeman:
1010

11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212

1313
steps:
1414
- uses: actions/checkout@v2

.github/workflows/danger.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Danger
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
danger:
7+
runs-on: ubuntu-24.04
8+
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: 'Determine Ruby and Bundler Versions from Gemfile.lock'
13+
run: |
14+
echo "RUBY_VERSION=`cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'`" >> $GITHUB_ENV
15+
echo "BUNDLER_VERSION=`cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'`" >> $GITHUB_ENV
16+
17+
# Install Ruby - using the version found in the Gemfile.lock
18+
- name: 'Install Ruby'
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: ${{ env.RUBY_VERSION }}
22+
23+
- name: 'Bundle Install'
24+
run: |
25+
gem install bundler -v ${{ env.BUNDLER_VERSION }}
26+
bundle config path vendor/bundle
27+
bundle install --jobs 4 --retry 3 --without pgsql rollbar aws
28+
29+
- name: 'Run Danger'
30+
env:
31+
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: bundle exec danger

.github/workflows/eslint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push, pull_request]
55
jobs:
66
eslint:
77

8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-24.04
99

1010
steps:
1111
# Checkout the repo
@@ -15,6 +15,7 @@ jobs:
1515
- uses: actions/setup-node@v2
1616
with:
1717
cache: 'yarn'
18+
node-version: 18
1819

1920
# Run yarn install for JS dependencies
2021
- name: 'Yarn Install'

.github/workflows/mysql.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [pull_request]
44

55
jobs:
66
mysql:
7-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-24.04
88

99
# Define environment variables for MySQL and Rails
1010
env:
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
# Checkout the repo
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818

1919
# Install Ruby and run bundler
2020
- uses: ruby/setup-ruby@v1
@@ -23,20 +23,22 @@ jobs:
2323
bundler-cache: true
2424

2525
# Install Node
26-
- uses: actions/setup-node@v2
26+
- uses: actions/setup-node@v3
2727
with:
28+
node-version: 18
2829
cache: 'yarn'
2930

3031
# Copy all of the example configs over
31-
- name: 'Setup Default Configuration'
32+
- name: 'Setup the application'
3233
run: |
3334
cp config/database.yml.sample config/database.yml
3435
cp config/initializers/contact_us.rb.example config/initializers/contact_us.rb
3536
cp config/initializers/wicked_pdf.rb.example config/initializers/wicked_pdf.rb
37+
cp .env.mysql2 .env
3638
3739
# Stub out the Rails credentials file so that we can start the Rails app
3840
- name: 'Setup Credentials'
39-
run: EDITOR='echo "$(cat config/credentials.yml.example)" >' bundle exec rails credentials:edit
41+
run: EDITOR="sh -c 'echo \"$(cat config/credentials.yml.mysql2)\" > \$1' --" bundle exec rails credentials:edit
4042

4143
# Set the path to the wkhtmltopdf executable
4244
- name: 'Determine wkhtmltopdf location'
@@ -52,8 +54,8 @@ jobs:
5254

5355
- name: 'Build out the test database'
5456
run: |
55-
bundle exec rails db:create RAILS_ENV=test
56-
bundle exec rails db:schema:load RAILS_ENV=test
57+
DISABLE_SPRING=1 bundle exec rails db:create RAILS_ENV=test
58+
DISABLE_SPRING=1 bundle exec rails db:schema:load RAILS_ENV=test
5759
5860
- name: 'Run any pending database migrations'
5961
run: bin/rails db:migrate RAILS_ENV=test

.github/workflows/postgres.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [pull_request]
44

55
jobs:
66
postgresql:
7-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-24.04
88

99
services:
1010
# Postgres installation
@@ -27,20 +27,25 @@ jobs:
2727
env:
2828
RAILS_ENV: test
2929
DATABASE_URL: postgres://postgres:@localhost:5432/roadmap_test
30+
DISABLE_SPRING: 1
3031

3132
steps:
3233
# Checkout the repo
33-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v3
3435

3536
# Install Ruby and run bundler
3637
- uses: ruby/setup-ruby@v1
3738
with:
3839
ruby-version: 3.3.8
3940
bundler-cache: true
4041

42+
## - run: echo 'NODE_OPTIONS="--openssl-legacy-provider"' >> $GITHUB_ENV
43+
## /home/runner/runners/2.301.1/externals/node12/bin/node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
44+
4145
# Install Node
42-
- uses: actions/setup-node@v2
46+
- uses: actions/setup-node@v3
4347
with:
48+
node-version: 18
4449
cache: 'yarn'
4550

4651
# Install the Postgres developer packages
@@ -49,18 +54,24 @@ jobs:
4954
sudo apt-get update
5055
sudo apt-get install libpq-dev
5156
57+
# Install ImageMagick (for `identify` command)
58+
- name: 'Install ImageMagick'
59+
run: |
60+
sudo apt-get install -y imagemagick
61+
5262
# Copy all of the example configs over
5363
- name: 'Setup Default Configuration'
5464
run: |
5565
cp config/database.yml.sample config/database.yml
5666
cp config/initializers/contact_us.rb.example config/initializers/contact_us.rb
5767
cp config/initializers/wicked_pdf.rb.example config/initializers/wicked_pdf.rb
68+
cp .env.postgresql .env
5869
5970
# Stub out the Rails credentials file so that we can start the Rails app
6071
- name: 'Setup Credentials'
6172
run: |
6273
# generate a default credential file and key
63-
EDITOR='echo "$(cat config/credentials.yml.example)" >' bundle exec rails credentials:edit
74+
EDITOR="sh -c 'echo \"$(cat config/credentials.yml.postgresql)\" > \$1' --" bundle exec rails credentials:edit
6475
6576
# Set the path to the wkhtmltopdf executable
6677
- name: 'Determine wkhtmltopdf location'
@@ -71,11 +82,23 @@ jobs:
7182
run: |
7283
yarn install
7384
85+
# TEMPORARY WORKAROUND FOR THE FOLLOWING ISSUE: https://github.com/DMPRoadmap/roadmap/issues/3485
86+
# Remove this once our tests are compatible with the new version of Chrome
87+
# Source: https://github.com/teamcapybara/capybara/issues/2800#issuecomment-2731100953
88+
- name: Remove image-bundled Chrome
89+
run: sudo apt-get purge google-chrome-stable
90+
- name: Setup stable Chrome
91+
uses: browser-actions/setup-chrome@v1
92+
with:
93+
chrome-version: 128
94+
install-chromedriver: true
95+
install-dependencies: true
96+
7497
# Initialize the DB
7598
- name: 'Setup Test DB'
7699
run: |
77-
bundle exec rails db:setup RAILS_ENV=test
78-
bundle exec rails db:migrate RAILS_ENV=test
100+
bundle exec rails db:setup
101+
bundle exec rails db:migrate
79102
80103
# Prebuild the CSS, JS and image assets
81104
- name: 'Compile Assets'

.github/workflows/rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
rubocop:
7-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-24.04
88

99
steps:
1010
# Checkout the repo

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ yarn-debug.log*
112112
/yarn-error.log
113113
yarn-debug.log*
114114
.yarn-integrity
115+
/app/assets/builds/*
116+
!/app/assets/builds/.keep
117+
!/app/assets/builds/.gitkeep
115118

116119
# Ignore briley AWS cloud9 script to start the application
117-
cloud9-start.sh
120+
cloud9-start.sh

0 commit comments

Comments
 (0)