Skip to content

Commit

Permalink
Merge pull request #1 from lifewatch-eric/ecoportal-ontoportal-reset
Browse files Browse the repository at this point in the history
Ontoportal align: Ecoportal ontoportal reset
  • Loading branch information
syphax-bouazzouni committed Sep 23, 2023
2 parents ecd7ccf + fd7d94c commit ea53c95
Show file tree
Hide file tree
Showing 33 changed files with 1,694 additions and 327 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ruby-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,26 @@ on:

jobs:
test:
strategy:
matrix:
backend: ['ruby', 'ruby-agraph'] # ruby runs tests with 4store backend and ruby-agraph runs with AllegroGraph backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: copy config.rb file from template
run: cp config/config.test.rb config/config.rb
- name: Build docker-compose
working-directory: ./test
run: docker-compose build
- name: Run unit tests
working-directory: ./test
run: docker-compose run unit-test wait-for-it solr-ut:8983 -- rake test TESTOPTS='-v'
run: |
ci_env=`bash <(curl -s https://codecov.io/env)`
docker-compose run $ci_env -e CI --rm ${{ matrix.backend }} bundle exec rake test TESTOPTS='-v'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
flags: unittests
verbose: true
fail_ci_if_error: false # optional (default = false)

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.bundle/
# Ignore RubyMine editor files
.idea/
config/config.rb
config/appliance.rb
config/config_*.rb
config/*.p12
projectFilesBackup/
Expand All @@ -11,6 +13,9 @@ repo*
.DS_Store
tmp

# Code coverage reports
coverage*

# Ignore eclipse .project
.project
.pmd
Expand Down
22 changes: 16 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
FROM ruby:2.6
ARG RUBY_VERSION
ARG DISTRO_NAME=bullseye

RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends openjdk-11-jre-headless raptor2-utils wait-for-it
FROM ruby:$RUBY_VERSION-$DISTRO_NAME

RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \
openjdk-11-jre-headless \
raptor2-utils \
&& rm -rf /var/lib/apt/lists/*

# The Gemfile Caching Trick
# we install gems before copying the code in its own layer so that gems would not have to get
# installed every single time code is updated
RUN mkdir -p /srv/ontoportal/ncbo_cron
RUN mkdir -p /srv/ontoportal/bundle
COPY Gemfile* *.gemspec /srv/ontoportal/ncbo_cron/

WORKDIR /srv/ontoportal/ncbo_cron
RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"

RUN gem update --system
RUN gem install bundler
ENV BUNDLE_PATH=/srv/ontoportal/bundle
RUN bundle install

COPY . /srv/ontoportal/ncbo_cron
CMD ["/bin/bash"]
17 changes: 9 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
gemspec

gem 'faraday', '~> 1.9'
gem 'ffi'
gem 'ffi', '~> 1.15.5'
gem "google-apis-analytics_v3"
gem 'mail', '2.6.6'
gem 'minitest', '< 5.0'
Expand All @@ -20,15 +20,16 @@ gem 'sys-proctable'
# Monitoring
gem 'cube-ruby', require: 'cube'

# NCBO
gem 'goo', github: 'ncbo/goo', branch: 'master'
gem 'ncbo_annotator', github: 'ncbo/ncbo_annotator', branch: 'master'
gem 'ncbo_resource_index', github: 'ncbo/resource_index'
gem 'ontologies_linked_data', github: 'lifewatch-eric/ontologies_linked_data', branch: 'master'
gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'master'

gem 'goo', git: 'https://github.com/ontoportal-lirmm/goo.git', branch: 'ecoportal'
gem 'sparql-client', github: 'ontoportal-lirmm/sparql-client', branch: 'master'
gem 'ontologies_linked_data', git: 'https://github.com/lifewatch-eric/ontologies_linked_data.git', branch: 'master'
gem 'ncbo_annotator', github: 'ontoportal-lirmm/ncbo_annotator', branch: 'master'
# Testing
group :test do
gem 'email_spec'
gem 'simplecov'
gem 'simplecov-cobertura' # for codecov.io
gem 'test-unit-minitest'
end

gem "binding_of_caller", "~> 1.0"
Loading

0 comments on commit ea53c95

Please sign in to comment.