Skip to content

Commit

Permalink
Merge branch 'seek-1.14' into digital-research-hub
Browse files Browse the repository at this point in the history
  • Loading branch information
somathias committed Aug 31, 2023
2 parents bd17441 + 61c9014 commit 46f112a
Show file tree
Hide file tree
Showing 811 changed files with 24,469 additions and 15,909 deletions.
92 changes: 92 additions & 0 deletions .github/workflows/ansible-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: ansible-install
run-name: "Testing Ansible install after commit \"${{ github.event.head_commit.message }}\""
on:
push:
branches:
- ansible
- full-test-suite
workflow_dispatch:

jobs:
install-seek-from-ansible:
runs-on: ${{matrix.os}}
continue-on-error: true
strategy:
matrix:
os: [ubuntu-20.04,ubuntu-22.04]

services:
mysql:
image: mysql:8.0.21
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD: ''
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 --restart=always

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Configure ansible for local install
working-directory: /home/runner/work/seek/seek/script/ansible/
run: |
sed -i '/vault_password_file/d' ansible.cfg
sed -i '/ssh_connection/d' ansible.cfg
sed -i '/pipelining/d' ansible.cfg
sed -i 's/\- hosts\: \[servers\]/\- hosts\: localhost/g' Deploy-SEEK.yml
sed -i '/\- hosts\: localhost/a \ \ connection\: local' Deploy-SEEK.yml
sed -i 's/user_var\: username/user_var\: runner/' group_vars/vars.yml
sed -i 's/git_dest\: \/home\/username/git_dest\: \/home\/runner\/work/' group_vars/vars.yml
sed -i 's|git_version: main|git_version: '"${GITHUB_REF_NAME}"'|' group_vars/vars.yml
sed -i '/sql_user\: sql_username/a sql_password: mysqlpassword' group_vars/vars.yml
- name: Prepares system for ansible install
run: |
sudo apt install acl -y
- name: Install SEEK through ansible
working-directory: /home/runner/work/seek/seek/script/ansible/
run: |
ansible-playbook Deploy-SEEK.yml --skip-tags database
- name: Configures database
working-directory: /home/runner/work/SEEK
run: |
cp config/database.default.yml config/database.yml
sed -i '/password\: mysqlpassword/a \ \ port\: 3306' config/database.yml
sed -i '/password\: mysqlpassword/a \ \ host\: 127.0.0.1' config/database.yml
sed -i 's/mysqluser/root/g' config/database.yml
sed -i 's/mysqlpassword//g' config/database.yml
bash -lc 'bundle exec rake db:setup'
- name: Runs seek unit tests
working-directory: /home/runner/work/SEEK
run: |
bash -lc 'bundle exec rails test test/unit'
- name: Runs seek integration tests
working-directory: /home/runner/work/SEEK
run: |
bash -lc 'bundle exec rails test test/integration'
- name: Runs seek functional tests
working-directory: /home/runner/work/SEEK
run: |
bash -lc 'bundle exec rails test test/functional'
fail-on-any-os:
# Without this step workflow remains "green" regardles of fails above.
name: Workflow Status
needs:
- install-seek-from-ansible
runs-on: ubuntu-latest
if: always()
steps:
- uses: technote-space/[email protected]
- name: Check Job Status status and fail if they are red
if: env.WORKFLOW_CONCLUSION == 'failure'
run: exit 1
3 changes: 2 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ name: Test Docker Image Build
on:
push:
branches:
- master
- main
- workflow
- workflowhub
- seek-1.11
- seek-1.12
- seek-1.13
- master-ibisba-demonstrator
- ruby-3
pull_request:

jobs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install -y graphicsmagick graphviz libcurl4-gnutls-dev libreoffice poppler-utils build-essential \
git imagemagick libgmp-dev python3.7-dev python3.7-distutils python3-pip
git imagemagick libgmp-dev python3.9-dev python3.9-distutils python3-pip
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Java
Expand All @@ -88,8 +88,8 @@ jobs:
${{ runner.os }}-
- name: Install Python dependencies
run: |
python3.7 -m pip install setuptools==58
python3.7 -m pip install -r requirements.txt
python3.9 -m pip install setuptools==58
python3.9 -m pip install -r requirements.txt
- name: Create test database
run: |
cp test/config/database.github.${{ matrix.database }}.yml config/database.yml
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,4 @@ docker-compose.override.yml
.env.local

.directory
*.ignore
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.7.8
ruby-3.1.4
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7-buster
FROM ruby:3.1-slim-bullseye

LABEL maintainer="Stuart Owen <orcid.org/0000-0003-2130-0865>, Finn Bacall"
ARG SOURCE_COMMIT
Expand All @@ -9,11 +9,11 @@ ENV RAILS_ENV=production
ENV LANG="en_US.UTF-8" LANGUAGE="en_US:UTF-8" LC_ALL="C.UTF-8"

RUN apt-get update -qq && \
apt-get install -y --no-install-recommends build-essential cmake gettext graphviz git \
libcurl4-gnutls-dev libmagick++-dev libpq-dev libreadline-dev \
apt-get install -y --no-install-recommends build-essential cmake curl default-mysql-client gettext graphviz git \
libcurl4-gnutls-dev libmagick++-dev libmariadb-dev libpq-dev libreadline-dev \
libreoffice libsqlite3-dev libssl-dev libxml++2.6-dev \
libxslt1-dev locales default-mysql-client nginx nodejs openjdk-11-jdk-headless \
python3.7-dev python3.7-distutils python3-pip \
libxslt1-dev locales nginx nodejs openjdk-11-jdk-headless \
python3.9-dev python3.9-distutils python3-pip \
poppler-utils postgresql-client shared-mime-info sqlite3 links telnet vim-tiny zip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
Expand Down Expand Up @@ -46,8 +46,8 @@ RUN touch config/using-docker #allows us to see within SEEK we are running in a

# Python dependencies from requirements.txt
ENV PATH="/var/www/.local/bin:$PATH"
RUN python3.7 -m pip install setuptools==58
RUN python3.7 -m pip install -r requirements.txt
RUN python3.9 -m pip install setuptools==58
RUN python3.9 -m pip install -r requirements.txt

# SQLite Database (for asset compilation)
RUN mkdir sqlite3-db && \
Expand Down
31 changes: 17 additions & 14 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ gem 'mysql2'
gem 'pg'
gem 'sqlite3', '~> 1.4'

gem 'feedjira', '~>1'
gem 'feedjira'
gem 'google-analytics-rails'
gem 'hpricot', '~>0.8.2'
gem 'libxml-ruby', '~>2.9.0', require: 'libxml'
gem 'uuid', '~>2.3'
gem 'RedCloth', '>=4.3.0'
gem 'simple-spreadsheet-extractor', '~> 0.17.0'
gem 'simple-spreadsheet-extractor', '~> 0.18.0'
gem 'open4'
gem 'sample-template-generator', '~>0.5'
gem 'rmagick', '2.15.2'
gem 'sample-template-generator', '~>0.7'
gem 'rmagick', '4.2.5'
gem 'rest-client', '~>2.0'
gem 'factory_girl', '2.6.4'
gem 'factory_bot', '~> 6.2.1'
gem 'bio', '~> 1.5.1'
gem 'sunspot_rails'
gem 'progress_bar'
Expand All @@ -39,7 +39,8 @@ gem 'active_model_serializers', '~> 0.10.13'
gem 'rubyzip'

gem 'equivalent-xml'
gem 'docsplit'
# FIXME: Change back to "official" docsplit if this PR is ever merged: https://github.com/documentcloud/docsplit/pull/159
gem 'docsplit', git: 'https://github.com/tuttiq/docsplit.git', ref: '6127e3912b8db94ed84dca6be5622d3d5ec0d879'
gem 'pothoven-attachment_fu'
gem 'exception_notification'
gem 'fssm'
Expand All @@ -51,14 +52,14 @@ gem 'will_paginate', '~> 3.1'
gem 'yaml_db'
gem 'rails_autolink'
gem 'rfc-822'
gem 'nokogiri', '~> 1.13.10'
gem 'nokogiri', '~> 1.14.3'
#necessary for newer hashie dependency, original api_smith is no longer active
gem 'api_smith', git: 'https://github.com/youroute/api_smith.git', ref: '1fb428cebc17b9afab25ac9f809bde87b0ec315b'
gem 'rdf-virtuoso', '>= 0.2.0'
gem 'terrapin'
gem 'lograge'
gem 'psych'
gem 'stringio', '0.1.0' #locked to the default version for ruby 2.7
gem 'stringio', '3.0.1' #locked to the default version for ruby 3.1
gem 'validate_url'
gem "attr_encrypted", "~> 3.0.0"
gem 'libreconv'
Expand All @@ -70,9 +71,9 @@ gem 'bives', "~> 2.0"
gem 'my_responds_to_parent', git: 'https://github.com/SysMO-DB/my_responds_to_parent.git'
gem 'bioportal', '>=3.0', git: 'https://github.com/SysMO-DB/bioportal.git'
gem 'doi_query_tool', git: 'https://github.com/seek4science/DOI-query-tool.git'
gem 'fleximage', git: 'https://github.com/SysMO-DB/fleximage.git', ref: 'bb1182f2716a9bf1b5d85e186d8bb7eec436797b'
gem 'fleximage', git: 'https://github.com/SysMO-DB/fleximage.git', ref: 'de03bf816a911dc4f69573fd300d4ff90225cca7'

gem 'jquery-rails', '~> 4.2.2'
gem 'jquery-rails', '~> 4.4.0'
gem 'jquery-ui-rails'
gem 'recaptcha', '~> 4.1.0'
gem 'metainspector'
Expand Down Expand Up @@ -152,10 +153,12 @@ gem 'remotipart', '~> 1.4.4' # Allows file upload in AJAX forms

gem 'rails-static-router'

# to avoid warnings after rails 6.1.7.2 update - see https://github.com/ruby/net-imap/issues/16
gem "net-http"
gem "net-ftp"
gem "uri", "0.10.0.2"
gem 'caxlsx', '>= 3.0' # Write content to an xlsx file
gem 'caxlsx_rails', '~> 0.6.2'

gem 'net-ftp'

gem 'licensee'

group :production do
gem 'passenger'
Expand Down
Loading

0 comments on commit 46f112a

Please sign in to comment.