Skip to content

Commit 1d80bb4

Browse files
authored
Merge pull request #2709 from DMPRoadmap/development
Finalize Rails5 release
2 parents 3fdceea + d423df7 commit 1d80bb4

File tree

996 files changed

+72462
-25699
lines changed

Some content is hidden

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

996 files changed

+72462
-25699
lines changed

.babelrc

Lines changed: 0 additions & 16 deletions
This file was deleted.

.browserslistrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
defaults
2+
> .25%
3+
Firefox >= 52
4+
IE >= 10

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"spyOnEvent": true
1717
},
1818
"rules": {
19+
"import/no-unresolved": "off",
1920
"indent": [
2021
"error",
2122
2
@@ -39,4 +40,4 @@
3940
"enforceForRenamedProperties": false
4041
}]
4142
}
42-
}
43+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

.github/workflows/brakeman.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ jobs:
1414
- uses: actions/checkout@v2
1515

1616
# Will run Brakeman checks on dependencies
17-
# https://github.com/marketplace/actions/brakeman-linter
17+
# https://github.com/marketplace/actions/brakeman-action
1818
- name: Brakeman
19-
uses: devmasx/[email protected]
19+
uses: artplan1/[email protected]
20+
with:
21+
flags: "--color"
2022
env:
21-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/eslint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ESLint
22

3-
on: [pull_request]
3+
on: [push, pull_request]
44

55
jobs:
66
eslint:

.github/workflows/mysql.yml

Lines changed: 27 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run Tests (mySQL)
1+
name: Tests - MySQL
22

33
on: [pull_request]
44

@@ -10,24 +10,24 @@ jobs:
1010
DB_ADAPTER: mysql2
1111
MYSQL_PWD: root
1212
RAILS_ENV: test
13+
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
1314

1415
steps:
1516
# Checkout the repo
1617
- uses: actions/checkout@v2
1718
with:
1819
fetch-depth: 1
1920

20-
# Install the necessary MySQL dev packages
21-
- name: 'Install Mysql Packages'
21+
- name: 'Install MySQL Packages'
2222
run: |
2323
sudo apt-get update
2424
sudo apt-get install -y mysql-client libmysqlclient-dev
2525
26-
# Extract the Ruby version from the Gemfile.lock
27-
- name: 'Determine Ruby Version'
28-
run: echo ::set-env name=RUBY_VERSION::$(echo `cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`)
26+
- name: 'Determine Ruby and Bundler Versions from Gemfile.lock'
27+
run: |
28+
echo ::set-env name=RUBY_VERSION::$(echo `cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`)
29+
echo ::set-env name=BUNDLER_VERSION::$(echo `cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]\.[0-9]'`)
2930
30-
# Install Ruby - using the version found in the Gemfile.lock
3131
- name: 'Install Ruby'
3232
uses: actions/setup-ruby@v1
3333
with:
@@ -37,13 +37,10 @@ jobs:
3737
- name: 'Setup Default Configuration'
3838
run: |
3939
# Make copies of all the example config files
40-
cp config/branding.yml.sample config/branding.yml
4140
cp config/database.yml.sample config/database.yml
42-
cp config/secrets.yml.sample config/secrets.yml
4341
cp config/initializers/contact_us.rb.example config/initializers/contact_us.rb
44-
cp config/initializers/devise.rb.example config/initializers/devise.rb
45-
cp config/initializers/recaptcha.rb.example config/initializers/recaptcha.rb
4642
cp config/initializers/wicked_pdf.rb.example config/initializers/wicked_pdf.rb
43+
cp config/credentials.yml.enc.workflow config/credentials.yml.enc
4744
4845
# Try to retrieve the gems from the cache
4946
- name: 'Cache Gems'
@@ -54,10 +51,9 @@ jobs:
5451
restore-keys: |
5552
${{ runner.os }}-gem-
5653
57-
# Install bundler and run bundle install
5854
- name: 'Bundle Install'
5955
run: |
60-
gem install bundler -v 1.17.2
56+
gem install bundler -v ${{ env.BUNDLER_VERSION }}
6157
bundle config path vendor/bundle
6258
bundle install --jobs 4 --retry 3 --without pgsql rollbar aws
6359
@@ -73,41 +69,36 @@ jobs:
7369
${{ runner.os }}-yarn-
7470
${{ runner.os }}-
7571
76-
# Figure out where wkhtmltopdf is installed
7772
- name: 'Determine wkhtmltopdf location'
78-
run: echo ::set-env name=WICKED_PDF_PATH::$(echo `bundle exec which wkhtmltopdf`)
79-
80-
# Startup MySQL
81-
- name: 'Start MySQL'
82-
run: sudo systemctl start mysql
83-
84-
73+
run: echo ::set-env name=WICKED_PDF_PATH::$(echo `bin/bundle exec which wkhtmltopdf`)
8574

86-
# Install the JS dependencies
8775
- name: 'Yarn Install'
8876
run: |
8977
yarn install
9078
91-
# Figure out where wkhtmltopdf is installed
92-
- name: 'Determine wkhtmltopdf location'
93-
run: echo ::set-env name=WICKED_PDF_PATH::$(echo `bundle exec which wkhtmltopdf`)
79+
- name: 'Start MySQL'
80+
run: sudo systemctl start mysql
9481

95-
# Setup the database
9682
- name: 'Setup Test DB'
97-
run: bundle exec rake db:setup RAILS_ENV=test
83+
run: bin/rails db:setup RAILS_ENV=test
84+
85+
- name: 'Migrate DB'
86+
run: bin/rails db:migrate RAILS_ENV=test
9887

99-
# Compile the assets
10088
- name: 'Compile Assets'
10189
run: |
102-
bundle exec rake webpacker:compile RAILS_ENV=test
103-
bundle exec rake assets:precompile RAILS_ENV=test
90+
bin/rails webpacker:compile
91+
bin/rails assets:precompile
10492
105-
# Run the JS tests
10693
- name: 'Run Karma Tests'
94+
run: yarn test
95+
96+
- name: 'Run Rspec Unit and Functional Tests'
10797
run: |
108-
yarn add karma
109-
yarn run test
98+
bin/bundle exec rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
99+
bin/bundle exec rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
100+
bin/bundle exec rspec spec/mixins/
110101
111-
# Run the Rspec tests
112-
- name: 'Run Rspec Tests'
113-
run: bundle exec rspec spec/
102+
# Only run Integration tests if the PR or Push is to master or development branches
103+
- name: 'Run Rspec Integration Tests'
104+
run: bin/bundle exec rspec spec/features/

.github/workflows/postgres.yml

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run Tests (postgreSQL)
1+
name: Tests - PostgreSQL
22

33
on: [pull_request]
44

@@ -26,23 +26,23 @@ jobs:
2626
env:
2727
RAILS_ENV: test
2828
DATABASE_URL: postgres://postgres:@localhost:5432/roadmap_test
29+
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
2930

3031
steps:
3132
# Checkout the repo
3233
- uses: actions/checkout@v2
3334
with:
3435
fetch-depth: 1
3536

36-
# Install the necessary Postgres dev packages
3737
- name: 'Install Postgresql Packages'
3838
run: |
3939
sudo apt-get update
4040
sudo apt-get install libpq-dev
4141
42-
# Extract the Ruby version from the Gemfile.lock
43-
- name: 'Determine Ruby Version'
44-
run: echo ::set-env name=RUBY_VERSION::$(echo `cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`)
45-
42+
- name: 'Determine Ruby and Bundler Versions from Gemfile.lock'
43+
run: |
44+
echo ::set-env name=RUBY_VERSION::$(echo `cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`)
45+
echo ::set-env name=BUNDLER_VERSION::$(echo `cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]\.[0-9]'`)
4646
4747
# Install Ruby - using the version found in the Gemfile.lock
4848
- name: 'Install Ruby'
@@ -54,13 +54,10 @@ jobs:
5454
- name: 'Setup Default Configuration'
5555
run: |
5656
# Make copies of all the example config files
57-
cp config/branding.yml.sample config/branding.yml
5857
cp config/database.yml.sample config/database.yml
59-
cp config/secrets.yml.sample config/secrets.yml
6058
cp config/initializers/contact_us.rb.example config/initializers/contact_us.rb
61-
cp config/initializers/devise.rb.example config/initializers/devise.rb
62-
cp config/initializers/recaptcha.rb.example config/initializers/recaptcha.rb
6359
cp config/initializers/wicked_pdf.rb.example config/initializers/wicked_pdf.rb
60+
cp config/credentials.yml.enc.workflow config/credentials.yml.enc
6461
6562
# Try to retrieve the gems from the cache
6663
- name: 'Cache Gems'
@@ -71,10 +68,9 @@ jobs:
7168
restore-keys: |
7269
${{ runner.os }}-gem-
7370
74-
# Install bundler and run bundle install
7571
- name: 'Bundle Install'
7672
run: |
77-
gem install bundler -v 1.17.2
73+
gem install bundler -v ${{ env.BUNDLER_VERSION }}
7874
bundle config path vendor/bundle
7975
bundle install --jobs 4 --retry 3 --without mysql rollbar aws
8076
@@ -90,35 +86,34 @@ jobs:
9086
${{ runner.os }}-yarn-
9187
${{ runner.os }}-
9288
93-
# Figure out where wkhtmltopdf is installed
9489
- name: 'Determine wkhtmltopdf location'
9590
run: echo ::set-env name=WICKED_PDF_PATH::$(echo `bundle exec which wkhtmltopdf`)
9691

97-
# Install the JS dependencies
9892
- name: 'Yarn Install'
9993
run: |
10094
yarn install
101-
102-
# Setup the database
95+
10396
- name: 'Setup Test DB'
104-
run: bundle exec rake db:setup RAILS_ENV=test
105-
106-
# Migrate
97+
run: bin/rails db:setup RAILS_ENV=test
98+
10799
- name: 'Migrate DB'
108-
run: bundle exec rake db:migrate RAILS_ENV=test
100+
run: bin/rails db:migrate RAILS_ENV=test
109101

110-
# Compile the assets
111102
- name: 'Compile Assets'
112103
run: |
113-
bundle exec rake webpacker:compile
114-
bundle exec rake assets:precompile
104+
bin/rails webpacker:compile
105+
bin/rails assets:precompile
115106
116-
# Run the JS tests
117107
- name: 'Run Karma Tests'
118-
run: |
119-
yarn add karma
120-
yarn run test
108+
run: yarn test
121109

122-
# Run the Rspec tests
123-
- name: 'Run Rspec Tests'
124-
run: bundle exec rspec spec/
110+
- name: 'Run Rspec Unit and Functional Tests'
111+
run: |
112+
bin/rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
113+
bin/rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
114+
bin/rspec spec/mixins/
115+
116+
# Integration Tests are only run if PR or Push is to master or development branches
117+
- name: 'Run Integration Tests'
118+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development'
119+
run: bin/rspec spec/features/

0 commit comments

Comments
 (0)