Skip to content

Commit

Permalink
Merge pull request #419 from uclibs/qa
Browse files Browse the repository at this point in the history
Move QA to Main branch
  • Loading branch information
Janell-Huyck authored Apr 16, 2024
2 parents 90a5ddf + 21edfc9 commit c6e7a26
Show file tree
Hide file tree
Showing 251 changed files with 9,117 additions and 3,018 deletions.
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults
73 changes: 50 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
# Ruby CircleCI 2.1 configuration file
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
version: 2.1
executors:
docker-publisher:
environment:
IMAGE_NAME: treatment-database-app
docker:
- image: docker:20.10.14-git

orbs:
ruby: circleci/ruby@2.0.0
node: circleci/node@5.0.2
browser-tools: circleci/browser-tools@1.4.7
coveralls: coveralls/coveralls@1.0.6

jobs:
build:
docker:
# specify the version you desire here
- image: circleci/ruby:2.6.5-node-browsers
- image: cimg/ruby:3.3.0

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4

environment:
BUNDLE_PATH: vendor/bundle
BUNDLE_JOBS: 4
Expand All @@ -25,10 +39,14 @@ jobs:
CACHE_PATH: /tmp/cache
COVERALLS_PARALLEL: true


working_directory: ~/aaec

steps:
- checkout
- node/install:
node-version: "18.17.1"
- browser-tools/install-browser-tools

- restore_cache:
keys:
Expand All @@ -41,13 +59,15 @@ jobs:
command: |
echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
source $BASH_ENV
gem install bundler -v 2.0.1
gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
- run:
name: Install Dependencies
command: |
bundle install --jobs=4 --retry=3 --path vendor/bundle
bundle install
sudo apt-get update
sudo apt-get install xvfb libfontconfig wkhtmltopdf
sudo apt-get install xvfb libfontconfig
- save_cache:
paths:
- ./vendor/bundle
Expand All @@ -57,33 +77,40 @@ jobs:
- run: bundle exec rake db:create
- run: bundle exec rake db:schema:load

# Rubocop
- run:
name: Rubocop
command: |
gem install rubocop
bundle exec rubocop
# Brakeman
- run:
name: Run Brakeman
command: bundle exec brakeman -q -w 2

# Bundler-audit
- run:
name: Install Bundler-audit
command: gem install bundler-audit
- run:
name: Run Bundle-audit
command: bundle exec bundle audit check --update

# run tests!
- run:
name: Run rspec in parallel
command: |
mkdir /tmp/test-results
bundle exec rspec $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
# collect reports
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: /tmp/test-results
destination: test-results
- store_artifacts:
path: coverage

- deploy:
name: Update Coveralls
command: |
curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_BUILD_NUM&payload[status]=done"
#bundle exec rspec --out /tmp/test-results/rspec.xml $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
- coveralls/upload:
parallel_finished: true
path_to_lcov: /home/circleci/aaec/coverage/lcov/aaec.lcov

workflows:
version: 2
ci:
jobs:
- build:
name: ruby2-6-5
version: 2
ci:
jobs:
- build
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service_name: cirleci
2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

4 changes: 2 additions & 2 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ AAEC_PUBLICATION_YEAR_START="January 2020"
AAEC_PUBLICATION_YEAR_END="December 2020"

# Expiration Date
EXPIRATION_DATE="Jan 1 2099"
PAST_DATE="Jan 2 2099"
EXPIRATION_DATE="Jan 01 2099"
PAST_DATE="Jan 02 2099"
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### Descriptive summary

Include a concise description of the issue and any relevant tracebacks if you're reporting a bug.

### Expected behavior

### Actual behavior

### Steps to reproduce the behavior

1. Do this
1. Then do this...

### Related work

Link to related issues or prior related work here.
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Fixes #issuenumber ; refs #issuenumber

Present short summary (50 characters or less)

More detailed description, if necessary. Try to be as descriptive as you can: even if you think that the PR content is obvious, it may not be obvious to others. Include tracebacks if helpful, and be sure to call out any bits of the PR that may be work-in-progress.

Description can have multiple paragraphs and you can use code examples inside:

``` ruby
class PostsController
def index
respond_with Post.limit(10)
end
end
```

Changes proposed in this pull request:
*
*
*
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
# "bundler" includes "rubygems"
- package-ecosystem: "bundler"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
# "npm" includes "yarn" and "pnpm"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,17 @@
.env.development.local
.env.test.local
.env.production.local

/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity

# Ignore Vendor Local
/vendor/bundle --local
/vendor/bundle

# Ignore the files specific to VSCode
.vscode/*
7 changes: 7 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2022-12-12 18:44:50 UTC using RuboCop version 1.40.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
2 changes: 1 addition & 1 deletion .ruby-gemset
Original file line number Diff line number Diff line change
@@ -1 +1 @@
aaec
aaec
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.6.5
3.3.0
10 changes: 6 additions & 4 deletions Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ require 'capistrano/rails/migrations'
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }

task :use_rvm do
require 'capistrano/rvm'
task :use_rbenv do
require 'capistrano/rbenv'
# require 'capistrano/rbenv_install'
end

task local: :use_rvm
task curly: :use_rvm
task local: :use_rbenv
task qa: :use_rbenv
task production: :use_rbenv
45 changes: 0 additions & 45 deletions Dockerfile

This file was deleted.

42 changes: 25 additions & 17 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.6.5'
ruby '3.3.0'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.4'
gem 'rails', '~> 6.1.7.7'
# gem 'sqlite3'

# Replaces Webpacker
gem 'jsbundling-rails'

# Use Puma as the app server
gem 'puma', '~> 3.12.4'
gem 'puma', '>= 6.3.1'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
gem 'sass-rails', '~> 6.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby

# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
gem 'coveralls', '~> 0.8.22', require: false
gem 'coffee-rails', '~> 5.0'
# gem 'coveralls', '~> 0.8.22', require: false
gem 'coveralls_reborn'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
Expand All @@ -41,14 +45,19 @@ gem 'jbuilder', '~> 2.5'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
gem 'bootstrap', '~> 4.4.1'
gem 'bootstrap', '~> 5.3.2'

gem 'bcrypt_pbkdf'
gem 'dotenv-rails'
gem 'ed25519'
gem 'jquery-rails'
gem 'pagy', '~> 3.7'
gem 'net-smtp'
gem 'pagy', '~> 7.0.10'
gem 'truncato'

group :development, :test do
gem 'brakeman', '~> 6.1'
gem 'bundler-audit', '~> 0.9.1'
gem 'byebug', platforms: %i[mri mingw x64_mingw]
gem 'factory_bot_rails'
gem 'rails-controller-testing'
Expand All @@ -60,25 +69,24 @@ group :development, :test do
end

group :development do
gem 'capistrano', '~> 3.10', require: false
gem 'capistrano-bundler', '~> 1.6', require: false
gem 'capistrano', '~> 3.18.1', require: false
gem 'capistrano-bundler', '~> 2.1', require: false
gem 'capistrano-rails', '~> 1.4', require: false
gem 'capistrano-rvm', require: false
gem 'capistrano-rbenv', '~> 2.0' # required
gem 'capistrano-rbenv-install', '~> 1.2.0'
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.10'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'spring-watcher-listen', '~> 2.1.0'
gem 'web-console', '>= 3.3.0'
end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'capybara-selenium', '~> 0.0.6'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'webdrivers'
gem 'selenium-webdriver', '~> 4.18.1'
end

group :production do
Expand Down
Loading

0 comments on commit c6e7a26

Please sign in to comment.