Skip to content

Commit

Permalink
Re-test ImageMagick 7
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoDelAssembly committed Feb 24, 2021
2 parents 0d51648 + 881fbd6 commit 91e982b
Show file tree
Hide file tree
Showing 1,645 changed files with 54,213 additions and 23,038 deletions.
2 changes: 1 addition & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
> 1%
defaults
3 changes: 1 addition & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
.otto*
*.orig
*.sql
.ruby-version
*.md
*.orig
.DS_Store
Expand Down Expand Up @@ -48,5 +47,5 @@ public/packs
public/assets

spec
.travis
.github
k8s
1 change: 1 addition & 0 deletions .github/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM mdillon/postgis:10

ENV POSTGRES_HOST_AUTH_METHOD=trust

RUN {\
echo "psql -U postgres -c 'CREATE ROLE travis SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;' && \
psql -U postgres -c 'CREATE DATABASE travis;' && \
Expand Down
9 changes: 9 additions & 0 deletions .github/docker-tests/Dockerfile.postgres12
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM postgis/postgis:12-3.0

ENV POSTGRES_HOST_AUTH_METHOD=trust

RUN {\
echo "psql -U postgres -c 'CREATE ROLE travis SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;' && \
psql -U postgres -c 'CREATE DATABASE travis;' && \
psql -U travis -c 'CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;'"; \
} > /docker-entrypoint-initdb.d/travis.sh
56 changes: 56 additions & 0 deletions .github/docker-tests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
version: "2.1"
services:
taxonworks:
build: ./docker-image-taxonworks
container_name: tw_container
depends_on:
db:
condition: service_healthy
ports:
- "127.0.0.1:80:80" # local:docker
links:
- db
environment:
- RAILS_ENV=production
- SERVER_NAME=localhost
- POSTGRES_HOST=db
- POSTGRES_DB=travis
- POSTGRES_USER=travis
- NGINX_SECRET_KEY=travis-nginx-secret
- SECRET_KEY_BASE=93cd9bcf60b5f3550071463e28b25fb163e5b8ccb7c877900e5edfecab14871e082975a19f63db3540d3d38ce67f9ff59dd7dd6d3218500658b877f7d7d23dd7
- TW_EXCEPTION_NOTIFICATION_EMAIL_PREFIX='"[TW-Error] "'
- TW_EXCEPTION_NOTIFICATION_SENDER_ADDRESS='"\"notifier\" <notifier@example.com>"'
- TW_EXCEPTION_RECIPIENTS=exceptions@example.com
- TW_ACTION_MAILER_SMTP_SETTINGS_ADDRESS=smtp.example.com
- TW_ACTION_MAILER_SMTP_SETTINGS_PORT=25
- TW_ACTION_MAILER_SMTP_SETTINGS_DOMAIN=example.com
- TW_ACTION_MAILER_URL_HOST=taxonworks
- TW_MAIL_DOMAIN=example.com
- TW_PATHS_STAGING=/staging
- TW_PATHS_BACKUP=/backup
- TW_SANDBOX_MODE=true
healthcheck:
test: ["CMD", "exe/docker_health_check.sh", "300", "80"]
timeout: 305s
interval: 10s
retries: 3
db:
build:
context: .
dockerfile: "Dockerfile.postgres${PG_VERSION}"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-h", "db"]
interval: 1s
timeout: 3s
retries: 30
test:
build: ./docker-image-test
stdin_open: true
tty: true
depends_on:
taxonworks:
condition: service_healthy
links:
- taxonworks
environment:
- REVISION=${REVISION}
8 changes: 8 additions & 0 deletions .github/docker-tests/docker-image-taxonworks/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM sfgrp/taxonworks

COPY init.rb /app/exe
COPY should_not_run_job.rb /app/app/jobs

RUN { echo "bundle exec rails r /app/exe/init.rb"; } >> /etc/my_init.d/init.sh

RUN echo "===[Built from revision `cat /app/REVISION`"]===
37 changes: 37 additions & 0 deletions .github/docker-tests/docker-image-taxonworks/init.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
user = User.create!(
name: 'John Doe',
email: 'admin@example.com',
password: 'taxonworks',
password_confirmation: 'taxonworks',
is_administrator: true,
self_created: true
)

project = Project.create(
name: "test_project",
by: user
)

ProjectMember.create!(
project: project,
user: user,
by: user
)

taxon_name = Protonym.create!(
name: "Testidae",
rank_class: Ranks.lookup(:iczn, 'Family'),
parent: project.root_taxon_name,
project: project,
by: user
)

otu = Otu.create!(
name: 'test_otu',
taxon_name: taxon_name,
project: project,
by: user
)

# Verify we don't run all queues
ShouldNotRunJob.perform_later(otu)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class ShouldNotRunJob < ApplicationJob
queue_as :should_not_run

def perform(otu)
otu.destroy!
end
end
1 change: 1 addition & 0 deletions .github/docker-tests/docker-image-test/.rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
28 changes: 28 additions & 0 deletions .github/docker-tests/docker-image-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM ruby:2.7.2

RUN apt-get update
RUN apt-get install -y curl bzip2 unzip default-jre \
libgtk-3-0 libgtk-3-dev libdbus-glib-1-2 libxt6 # Firefox requirements

RUN curl -sL 'https://download.mozilla.org/?product=firefox-79.0&lang=en-US&os=linux64' | \
tar -xjf - -C /usr/bin

RUN /usr/bin/firefox/firefox --version

ENV PATH /usr/bin/firefox/:$PATH

RUN mkdir /app

WORKDIR /app

RUN wget -q \
'https://github.com/browserup/browserup-proxy/releases/download/v2.0.1/browserup-proxy-2.0.1.zip' \
&& unzip browserup-proxy-2.0.1.zip

COPY Gemfile .

RUN bundle install -j3

COPY . .

#CMD ["bundle", "exec", "rspec", "-fd"]
7 changes: 7 additions & 0 deletions .github/docker-tests/docker-image-test/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'

gem 'selenium-webdriver', '~> 3.142', '>= 3.142.3'
gem 'geckodriver-helper', '~> 0.24.0'
gem 'browsermob-proxy', '~> 0.3.1'
gem 'rspec', '~> 3.8'
gem 'capybara', '~> 3.29'
105 changes: 105 additions & 0 deletions .github/docker-tests/docker-image-test/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
require 'capybara/rspec'
# This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause
# this file to always be loaded, without a need to explicitly require it in any
# files.
#
# Given that it is always loaded, you are encouraged to keep this file as
# light-weight as possible. Requiring heavyweight dependencies from this file
# will add to the boot time of your test suite on EVERY test run, even for an
# individual file that may not need all of that loaded. Instead, consider making
# a separate helper file that requires the additional dependencies and performs
# the additional setup, and require it from the spec files that actually need
# it.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration

RSpec.configure do |config|

config.include Capybara::DSL

# rspec-expectations config goes here. You can use an alternate
# assertion/expectation library such as wrong or the stdlib/minitest
# assertions if you prefer.
config.expect_with :rspec do |expectations|
# This option will default to `true` in RSpec 4. It makes the `description`
# and `failure_message` of custom matchers include text for helper methods
# defined using `chain`, e.g.:
# be_bigger_than(2).and_smaller_than(4).description
# # => "be bigger than 2 and smaller than 4"
# ...rather than:
# # => "be bigger than 2"
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end

# rspec-mocks config goes here. You can use an alternate test double
# library (such as bogus or mocha) by changing the `mock_with` option here.
config.mock_with :rspec do |mocks|
# Prevents you from mocking or stubbing a method that does not exist on
# a real object. This is generally recommended, and will default to
# `true` in RSpec 4.
mocks.verify_partial_doubles = true
end

# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
# have no way to turn it off -- the option exists only for backwards
# compatibility in RSpec 3). It causes shared context metadata to be
# inherited by the metadata hash of host groups and examples, rather than
# triggering implicit auto-inclusion in groups with matching metadata.
config.shared_context_metadata_behavior = :apply_to_host_groups

# The settings below are suggested to provide a good initial experience
# with RSpec, but feel free to customize to your heart's content.
=begin
# This allows you to limit a spec run to individual examples or groups
# you care about by tagging them with `:focus` metadata. When nothing
# is tagged with `:focus`, all examples get run. RSpec also provides
# aliases for `it`, `describe`, and `context` that include `:focus`
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
config.filter_run_when_matching :focus
# Allows RSpec to persist some state between runs in order to support
# the `--only-failures` and `--next-failure` CLI options. We recommend
# you configure your source control system to ignore this file.
config.example_status_persistence_file_path = "spec/examples.txt"
# Limits the available syntax to the non-monkey patched syntax that is
# recommended. For more details, see:
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
config.disable_monkey_patching!
# This setting enables warnings. It's recommended, but in some cases may
# be too noisy due to issues in dependencies.
config.warnings = true
# Many RSpec users commonly either run the entire suite or an individual
# file, and it's useful to allow more verbose output when running an
# individual spec file.
if config.files_to_run.one?
# Use the documentation formatter for detailed output,
# unless a formatter has already been configured
# (e.g. via a command-line flag).
config.default_formatter = "doc"
end
# Print the 10 slowest examples and example groups at the
# end of the spec run, to help surface which specs are running
# particularly slow.
config.profile_examples = 10
# Run specs in random order to surface order dependencies. If you find an
# order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run.
# --seed 1234
config.order = :random
# Seed global randomization in this process using the `--seed` CLI option.
# Setting this allows you to use `--seed` to deterministically reproduce
# test failures related to randomization by passing the same `--seed` value
# as the one that triggered the failure.
Kernel.srand config.seed
=end
end
Loading

0 comments on commit 91e982b

Please sign in to comment.