Skip to content

Commit

Permalink
Merge pull request #3049 from DMPRoadmap/pdf-coversheet-fix
Browse files Browse the repository at this point in the history
Updated PDF coversheet to always show the creator of the DMP
  • Loading branch information
raycarrick-ed committed Jan 27, 2022
2 parents 43c5b03 + 22c1d16 commit a4407e8
Show file tree
Hide file tree
Showing 501 changed files with 14,174 additions and 16,917 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@ jobs:
runs-on: ubuntu-latest

steps:
# Checkout the repo
- uses: actions/checkout@v2

# Will run ES Lint checks on javascript files
# Install Node
- uses: actions/setup-node@v2
with:
cache: 'yarn'

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

# Run the ES Lint checks on javascript files
# https://github.com/marketplace/actions/run-eslint
- name: 'ES Lint checks'
uses: stefanoeb/[email protected]
Expand Down
84 changes: 25 additions & 59 deletions .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jobs:
mysql:
runs-on: ubuntu-latest

# Define environment variables for MySQL and Rails
env:
DB_ADAPTER: mysql2
MYSQL_PWD: root
Expand All @@ -14,94 +15,59 @@ jobs:
steps:
# Checkout the repo
- uses: actions/checkout@v2
with:
fetch-depth: 1

- name: 'Install MySQL Packages'
run: |
sudo apt-get update
sudo apt-get install -y mysql-client libmysqlclient-dev

- name: 'Determine Ruby and Bundler Versions from Gemfile.lock'
run: |
echo "RUBY_VERSION=`cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
echo "BUNDLER_VERSION=`cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
# Install Ruby and run bundler
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.3
bundler-cache: true

- name: 'Install Ruby'
uses: actions/setup-ruby@v1
# Install Node
- uses: actions/setup-node@v2
with:
ruby-version: ${{ env.RUBY_VERSION }}
cache: 'yarn'

# Copy all of the example configs over
- name: 'Setup Default Configuration'
run: |
# Make copies of all the example config files
cp config/database.yml.sample config/database.yml
cp config/initializers/contact_us.rb.example config/initializers/contact_us.rb
cp config/initializers/wicked_pdf.rb.example config/initializers/wicked_pdf.rb
# Try to retrieve the gems from the cache
- name: 'Cache Gems'
uses: actions/[email protected]
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: 'Bundle Install'
run: |
gem install bundler -v ${{ env.BUNDLER_VERSION }}
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3 --without pgsql rollbar aws
# Stub out the Rails credentials file so that we can start the Rails app
- name: 'Setup Credentials'
run: |
# generate a default credential file and key
EDITOR='echo "$(cat config/credentials.yml.example)" >' bundle exec rails credentials:edit
# Try to retrieve the yarn JS dependencies from the cache
- name: 'Cache Yarn Packages'
uses: actions/[email protected]
with:
path: node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-yarn-
${{ runner.os }}-
run: EDITOR='echo "$(cat config/credentials.yml.example)" >' bundle exec rails credentials:edit

# Set the path to the wkhtmltopdf executable
- name: 'Determine wkhtmltopdf location'
run: echo "WICKED_PDF_PATH=`bundle exec which wkhtmltopdf`" >> $GITHUB_ENV

# Run yarn install for JS dependencies
- name: 'Yarn Install'
run: |
yarn install
run: yarn install

# Start the DB server and initialize the DB
- name: 'Start MySQL'
run: sudo systemctl start mysql

- name: 'Setup Test DB'
run: bin/rails db:setup RAILS_ENV=test

- name: 'Migrate DB'
run: bin/rails db:migrate RAILS_ENV=test

- name: 'Compile Assets'
run: |
bin/rails webpacker:compile
bin/rails assets:precompile
sudo systemctl start mysql
bin/rails db:setup RAILS_ENV=test
bin/rails db:migrate RAILS_ENV=test
# Prebuild the CSS, JS and image assets
- name: 'Precompile all of the Assets'
run: bin/rails assets:precompile

# Run the JS tests
- name: 'Run Karma Tests'
run: yarn test

# Run the unit and functional tests
- name: 'Run Rspec Unit and Functional Tests'
run: |
bin/bundle exec rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
bin/bundle exec rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
bin/bundle exec rspec spec/mixins/
# Only run Integration tests if the PR or Push is to master or development branches
# Run the time consuming integration tests (using Chrome headless browser)
- name: 'Run Rspec Integration Tests'
run: bin/bundle exec rspec spec/features/
72 changes: 24 additions & 48 deletions .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,99 +23,75 @@ jobs:
--health-timeout 5s
--health-retries 5
# Define environment variables for Postgres and Rails
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:@localhost:5432/roadmap_test

steps:
# Checkout the repo
- uses: actions/checkout@v2

# Install Ruby and run bundler
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.3
bundler-cache: true

# Install Node
- uses: actions/setup-node@v2
with:
fetch-depth: 1
cache: 'yarn'

# Install the Postgres developer packages
- name: 'Install Postgresql Packages'
run: |
sudo apt-get update
sudo apt-get install libpq-dev
- name: 'Determine Ruby and Bundler Versions from Gemfile.lock'
run: |
echo "RUBY_VERSION=`cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
echo "BUNDLER_VERSION=`cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
# Install Ruby - using the version found in the Gemfile.lock
- name: 'Install Ruby'
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}

# Copy all of the example configs over
- name: 'Setup Default Configuration'
run: |
# Make copies of all the example config files
cp config/database.yml.sample config/database.yml
cp config/initializers/contact_us.rb.example config/initializers/contact_us.rb
cp config/initializers/wicked_pdf.rb.example config/initializers/wicked_pdf.rb
# Try to retrieve the gems from the cache
- name: 'Cache Gems'
uses: actions/[email protected]
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: 'Bundle Install'
run: |
gem install bundler -v ${{ env.BUNDLER_VERSION }}
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3 --without mysql rollbar aws
# Stub out the Rails credentials file so that we can start the Rails app
- name: 'Setup Credentials'
run: |
# generate a default credential file and key
EDITOR='echo "$(cat config/credentials.yml.example)" >' bundle exec rails credentials:edit
# Try to retrieve the yarn JS dependencies from the cache
- name: 'Cache Yarn Packages'
uses: actions/[email protected]
with:
path: node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-yarn-
${{ runner.os }}-
# Set the path to the wkhtmltopdf executable
- name: 'Determine wkhtmltopdf location'
run: echo "WICKED_PDF_PATH=`bundle exec which wkhtmltopdf`" >> $GITHUB_ENV

# Run yarn install for JS dependencies
- name: 'Yarn Install'
run: |
yarn install
# Initialize the DB
- name: 'Setup Test DB'
run: bin/rails db:setup RAILS_ENV=test

- name: 'Migrate DB'
run: bin/rails db:migrate RAILS_ENV=test
run: |
bin/rails db:setup RAILS_ENV=test
bin/rails db:migrate RAILS_ENV=test
# Prebuild the CSS, JS and image assets
- name: 'Compile Assets'
run: |
bin/rails webpacker:compile
bin/rails assets:precompile
run: bin/rails assets:precompile

# Run the JS tests
- name: 'Run Karma Tests'
run: yarn test

# Run the unit and functional tests
- name: 'Run Rspec Unit and Functional Tests'
run: |
bin/rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
bin/rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
bin/rspec spec/mixins/
# Integration Tests are only run if PR or Push is to master or development branches
# Run the time consuming integration tests (using Chrome headless browser)
- name: 'Run Integration Tests'
run: bin/rspec spec/features/
21 changes: 6 additions & 15 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,15 @@ jobs:
runs-on: ubuntu-latest

steps:
# Checkout the repo
- uses: actions/checkout@v2

- name: 'Determine Ruby and Bundler Versions from Gemfile.lock'
run: |
echo "RUBY_VERSION=`cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
echo "BUNDLER_VERSION=`cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
# Install Ruby - using the version found in the Gemfile.lock
- name: 'Install Ruby'
uses: actions/setup-ruby@v1
# Install Ruby and run bundler
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}

- name: 'Bundle Install'
run: |
gem install bundler -v ${{ env.BUNDLER_VERSION }}
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3 --without pgsql rollbar aws
ruby-version: 2.6.3
bundler-cache: true

# Run the Rubocop linter checks
- name: 'Run Rubocop'
run: bin/rubocop
Loading

0 comments on commit a4407e8

Please sign in to comment.