Skip to content

Commit

Permalink
Merge pull request #11 from ontoportal-lirmm/development
Browse files Browse the repository at this point in the history
Merge development and upstream
  • Loading branch information
syphax-bouazzouni authored Dec 24, 2022
2 parents d099991 + b2521da commit 3296b76
Show file tree
Hide file tree
Showing 19 changed files with 693 additions and 202 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)

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ repo*
.DS_Store
tmp

# Code coverage reports
coverage*

# Ignore eclipse .project
.project
.pmd
Expand Down
23 changes: 16 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +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 ["bundle","exec","rackup","-p","9393","--host","0.0.0.0"]
CMD ["/bin/bash"]
8 changes: 3 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ gemspec

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

# NCBO gems (can be from a local dev path or from rubygems/git)
gem 'goo', github: 'ontoportal-lirmm/goo', branch: 'master'
gem 'sparql-client', github: 'ontoportal-lirmm/sparql-client', branch: 'master'
gem 'ontologies_linked_data', github: 'ontoportal-lirmm/ontologies_linked_data', branch: 'master'
gem 'ncbo_annotator', github: 'ontoportal-lirmm/ncbo_annotator', branch: 'master'
gem 'ncbo_resource_index', github: 'ncbo/resource_index'


# Testing
group :test do
gem 'email_spec'
gem 'simplecov'
gem 'simplecov-cobertura' # for codecov.io
gem 'test-unit-minitest'
end

115 changes: 52 additions & 63 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
GIT
remote: https://github.com/ncbo/resource_index.git
revision: 24a7f14a6da4f4a0eaba1016ca5a378dfccd7441
specs:
ncbo_resource_index (0.0.1)
elasticsearch (= 2.0.0)
mysql2 (= 0.5.2)
pony
ref
ruby-xxHash
sequel
typhoeus

GIT
remote: https://github.com/ontoportal-lirmm/goo.git
revision: 199f12edacb7efba7f192cd24149e3dc656fb5de
revision: 92968978e5d2436c648bf7956e25aff05440b59d
branch: master
specs:
goo (0.0.2)
addressable (= 2.3.5)
addressable (~> 2.8)
pry
rdf (= 1.0.8)
redis
rest-client
rsolr
sparql-client
systemu
uuid

GIT
Expand All @@ -40,7 +26,7 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/ontologies_linked_data.git
revision: 23fe9b9eddfa5cdb6bad677d57e9a8f0c55e78e1
revision: c98145605413e459d3c09a41d3c28a5acd0c49e4
branch: master
specs:
ontologies_linked_data (0.0.1)
Expand Down Expand Up @@ -74,7 +60,7 @@ PATH
ncbo_cron (0.0.1)
dante
goo
google-api-client
google-apis-analytics_v3
mlanett-redis-lock
multi_json
ncbo_annotator
Expand All @@ -88,7 +74,8 @@ GEM
activesupport (3.2.22.5)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
addressable (2.3.5)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
bcrypt (3.1.18)
builder (3.2.4)
coderay (1.1.3)
Expand All @@ -97,22 +84,13 @@ GEM
cube-ruby (0.0.3)
dante (0.2.0)
declarative (0.0.20)
docile (1.4.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
elasticsearch (2.0.0)
elasticsearch-api (= 2.0.0)
elasticsearch-transport (= 2.0.0)
elasticsearch-api (2.0.0)
multi_json
elasticsearch-transport (2.0.0)
faraday
multi_json
email_spec (2.1.1)
htmlentities (~> 4.3.3)
launchy (~> 2.1)
mail (~> 2.6)
ethon (0.15.0)
ffi (>= 1.15.0)
faraday (1.10.2)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand All @@ -137,37 +115,38 @@ GEM
faraday-rack (1.0.0)
faraday-retry (1.0.3)
ffi (1.15.5)
google-api-client (0.10.3)
addressable (~> 2.3)
googleauth (~> 0.5)
httpclient (~> 2.7)
hurley (~> 0.1)
memoist (~> 0.11)
mime-types (>= 1.6)
google-apis-analytics_v3 (0.12.0)
google-apis-core (>= 0.9.1, < 2.a)
google-apis-core (0.9.2)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
googleauth (0.17.1)
faraday (>= 0.17.3, < 2.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
googleauth (1.3.0)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.15)
signet (>= 0.16, < 2.a)
htmlentities (4.3.4)
http-accept (1.7.0)
http-cookie (1.0.5)
domain_name (~> 0.5)
httpclient (2.8.3)
hurley (0.2)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
json (2.6.2)
json_pure (2.6.2)
jwt (2.5.0)
launchy (2.4.3)
addressable (~> 2.3)
libxml-ruby (3.2.3)
logger (1.5.1)
json (2.6.3)
json_pure (2.6.3)
jwt (2.6.0)
launchy (2.5.0)
addressable (~> 2.7)
libxml-ruby (3.2.4)
logger (1.5.3)
macaddr (1.7.2)
systemu (~> 2.6.5)
mail (2.6.6)
Expand All @@ -177,12 +156,12 @@ GEM
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
mini_mime (1.1.2)
minitest (4.7.5)
mlanett-redis-lock (0.2.7)
redis
multi_json (1.15.0)
multipart-post (2.2.3)
mysql2 (0.5.2)
net-http-persistent (2.9.4)
netrc (0.11.0)
oj (2.18.5)
Expand All @@ -195,17 +174,17 @@ GEM
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
rack (3.0.0)
public_suffix (5.0.1)
rack (3.0.2)
rack-test (2.0.2)
rack (>= 1.3)
rake (13.0.6)
rdf (1.0.8)
addressable (>= 2.2)
redis (5.0.5)
redis-client (>= 0.9.0)
redis-client (0.10.0)
redis-client (0.11.2)
connection_pool
ref (2.0.0)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
Expand All @@ -216,6 +195,7 @@ GEM
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
retriable (3.1.2)
rexml (3.2.5)
rsolr (2.5.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
Expand All @@ -224,20 +204,26 @@ GEM
rubyzip (2.3.2)
rufus-scheduler (2.0.24)
tzinfo (>= 0.3.22)
sequel (5.61.0)
signet (0.15.0)
addressable (~> 2.3)
faraday (>= 0.17.3, < 2.0)
signet (0.17.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
sys-proctable (1.2.6)
ffi
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-cobertura (2.1.0)
rexml
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sys-proctable (1.2.7)
ffi (~> 1.1)
systemu (2.6.5)
test-unit-minitest (0.9.1)
minitest (~> 4.7)
trailblazer-option (0.1.2)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
uber (0.1.0)
Expand All @@ -246,8 +232,10 @@ GEM
unf_ext (0.0.8.2)
uuid (2.3.9)
macaddr (~> 1.0)
webrick (1.7.0)

PLATFORMS
x86_64-darwin-21
x86_64-linux

DEPENDENCIES
Expand All @@ -256,13 +244,12 @@ DEPENDENCIES
faraday (~> 1.9)
ffi
goo!
google-api-client (~> 0.10)
google-apis-analytics_v3
mail (= 2.6.6)
minitest (< 5.0)
multi_json
ncbo_annotator!
ncbo_cron!
ncbo_resource_index!
oj (~> 2.0)
ontologies_linked_data!
parseconfig
Expand All @@ -271,9 +258,11 @@ DEPENDENCIES
rake
redis
rest-client
simplecov
simplecov-cobertura
sparql-client!
sys-proctable
test-unit-minitest

BUNDLED WITH
2.3.23
2.3.22
Loading

0 comments on commit 3296b76

Please sign in to comment.