Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
216 commits
Select commit Hold shift + click to select a range
2d737f1
reset branch specifier to develop
alexskr Aug 19, 2025
1c52fc0
Gemfile.lock update
alexskr Aug 29, 2025
759dbc0
implemented an endpoint for bulk submission deletions via process_lon…
mdorf Sep 4, 2025
2e1ab47
added security check to the bulk submission deletion endpoint
mdorf Sep 4, 2025
23c2ccd
an improved input parsing for bulk submission deletion
mdorf Sep 17, 2025
b94c0e3
updated the process_long_operation method to handle more cases
mdorf Sep 17, 2025
4727d98
updated sparql-client gem to point to master
mdorf Sep 17, 2025
05ebc9b
Gemfile.lock update
alexskr Sep 23, 2025
935dfdd
fixes for submissions bulk delete method
mdorf Oct 24, 2025
bb43445
Merge branch 'feature/user-admin-endpoints' of github.com:ncbo/ontolo…
mdorf Oct 24, 2025
558c168
Merge branch 'develop' into feature/user-admin-endpoints
alexskr Oct 27, 2025
6e55c95
Merge pull request #196 from ncbo/feature/user-admin-endpoints
alexskr Oct 28, 2025
3fc97b1
Gemfile.lock update
alexskr Oct 28, 2025
bdca274
Refactor: use idiomatic Minitest assertions in ontology submissions t…
alexskr Oct 31, 2025
becf5d4
Refactor test_access_control_helper to use class instance variables
alexskr Oct 31, 2025
daef301
test: clean up delete ontology submissions test logic and polling con…
alexskr Nov 4, 2025
51fbbb0
test: fix incorrect assertions and add verification for slice creatio…
alexskr Nov 4, 2025
291406b
test: fail fast on error payloads in bulk delete polling
alexskr Nov 4, 2025
1ffbf63
Reset enable_slices in after_suite
alexskr Nov 5, 2025
fa6f603
cleanup: remove dead code
alexskr Nov 5, 2025
cef113f
test: use idiomatic Minitest assertions
alexskr Nov 5, 2025
7c774b0
test: remove binding.pry
alexskr Nov 5, 2025
08754e1
cleanup: remove leftover commented-out code
alexskr Nov 5, 2025
9a905c1
added code to address random failures during unit test runs
mdorf Nov 5, 2025
a639b37
Merge branch 'refactor/tests-stability-and-minitest-style' of github.…
mdorf Nov 5, 2025
b395c48
Gemfile.lock update
alexskr Nov 5, 2025
ba9e9d9
test: remove suite globals in OntologySubmissions tests; add reusable…
alexskr Nov 6, 2025
1036e0e
tests: remove custom user creation/deletion, rely on default factory …
alexskr Nov 6, 2025
1392b88
chore(style) fix RuboCop offences
alexskr Nov 7, 2025
f115fbb
Merge pull request #198 from ncbo/refactor/tests-stability-and-minite…
alexskr Nov 7, 2025
558f569
Merge pull request #199 from ncbo/feature/user-admin-endpoints
alexskr Nov 7, 2025
c48c0cd
Merge branch 'master' into develop
alexskr Nov 12, 2025
929a705
Merge pull request #200 from ncbo/develop
alexskr Nov 12, 2025
4cabfcd
reset branch specifier to master
alexskr Nov 12, 2025
e3e983d
addressed a minor vulnerability with ontology processing logs
mdorf Dec 16, 2025
0306738
reverted Gemfile.lock
mdorf Dec 16, 2025
52f4bbf
CI: Refactor deployment workflow (#201)
alexskr Dec 17, 2025
a1b5656
Merge pull request #202 from ncbo/develop
alexskr Dec 17, 2025
5da0737
initial commit, work-in-progress: sinatra 4.2.1 compatibiity
mdorf Jan 23, 2026
c8919ec
initial commit, work-in-progress: sinatra 4.2.1 compatibiity
mdorf Jan 23, 2026
9937e86
progress commit; sinatra 4.2.1 upgrade
mdorf Jan 23, 2026
3753047
Gemfile.lock update
alexskr Jan 27, 2026
dae3e85
Gemfile.lock update
alexskr Jan 27, 2026
e91f1b2
added solr admin endpoints
mdorf Jan 28, 2026
a15ccfd
synchronized test ontology files with AgroPortal
mdorf Jan 28, 2026
9649a3a
Gemfile.lock update
mdorf Jan 28, 2026
a162678
added code to disable security for test after_all calls
mdorf Jan 28, 2026
8638245
added a safeguard to disable security if test that uses it fails
mdorf Jan 28, 2026
8768093
updated test_rack_attack to Rackup
mdorf Jan 28, 2026
fad1d19
search_helper improved language handling; metadata search options
mdorf Jan 28, 2026
f711f82
Gemfile.lock udpate
mdorf Jan 28, 2026
daf7063
added endpoints for ontologies and content searches
mdorf Jan 28, 2026
96c7e1d
added ability to filter and paginate submission endpoint
mdorf Jan 28, 2026
355e868
refactored test_submissions_includes tests
mdorf Jan 28, 2026
7eaf9cd
added test_mappings_slices test to test_slices_helper
mdorf Jan 29, 2026
4a9ffbd
ruby 3.2 compatibility updates
mdorf Jan 29, 2026
5671104
re-added cube but will remove it again
mdorf Jan 29, 2026
65d1c3f
removed cube integration as it's not being used
mdorf Jan 29, 2026
cc92729
removed the newrelic integration for now; it needs to be re-integrated
mdorf Jan 29, 2026
697af25
fixed oboId and notation searches
mdorf Jan 29, 2026
7ce9188
fixed the unit test test_language_attribute_filter
mdorf Jan 29, 2026
e6971cb
resoved an issue with setting filenames in create_ontology
mdorf Jan 29, 2026
1601744
removed double-quoting around the test_search_security query based on…
mdorf Jan 30, 2026
a8fb6e0
disabled test_search_custom_onts in test_users_helper due to its inco…
mdorf Jan 30, 2026
8624e26
fixed test_default_multilingual test because language :none changed t…
mdorf Jan 30, 2026
546e92a
Gemfile.lock update
mdorf Feb 1, 2026
08b0ed0
updated test_default_multilingual unit test to correctly test for fre…
mdorf Feb 2, 2026
72e2f1e
Gemfile.lock update
mdorf Feb 3, 2026
3f720c3
fixed a failing unit test, test_default_multilingual
mdorf Feb 3, 2026
a9508b9
removed minitest-fail-fast gem, as minitest 6 already includes --fail…
mdorf Feb 3, 2026
092df33
Gemfile.lock update
mdorf Feb 3, 2026
6d58a85
Gemfile.lock update
mdorf Feb 3, 2026
88a8aa1
Gemfile.lock update
mdorf Feb 3, 2026
bea5b8f
Gemfile.lock update
mdorf Feb 5, 2026
ea570ed
fixed the warning: detected duplicate key creator in JSON object. Thi…
mdorf Feb 5, 2026
0ae6948
re-enabled the test test_search_models_controller/test_search_data. I…
mdorf Feb 5, 2026
ab55e41
fixed a missing require
mdorf Feb 5, 2026
71e1367
fixed docker-compose vars
mdorf Feb 5, 2026
7b81f9a
added ability to return unmapped attributes for properties
mdorf Feb 6, 2026
721ea06
fixed the unit test test_show_all_collection to allow for two optiona…
mdorf Feb 6, 2026
3044788
added resource dereference controller and tests
mdorf Feb 8, 2026
651cd58
moved redis_goo and redis_http to application_helper
mdorf Feb 11, 2026
b217034
Gemfile.lock update
mdorf Feb 11, 2026
f96728a
added user OAuth authentication capability
mdorf Feb 11, 2026
ca1d1a8
use ruby 3.2.9
alexskr Feb 25, 2026
175b077
prune platforms
alexskr Feb 25, 2026
748eb4c
re-enable capistrano/rbenv
alexskr Feb 25, 2026
5e9cd8d
Gemfile.lock update
mdorf Feb 26, 2026
decafc6
removed the use of shotgun server. Now use: bundle exec rackup -E dev…
mdorf Feb 26, 2026
334131a
Gemfile.lock update
mdorf Feb 26, 2026
223cae3
fixed routes for Sinatra 4, which changed from objects to arrays
mdorf Feb 27, 2026
2209513
added home controller tests to validate the routes
mdorf Feb 27, 2026
0b36528
update ncbo_cron gem
alexskr Feb 28, 2026
7b122a3
remove .second for compatiblty reasons
alexskr Feb 28, 2026
9a95846
Gemfile.lock update
alexskr Feb 28, 2026
1f8c695
fixed the @context not showing in home API service call
mdorf Mar 3, 2026
d6d17cf
Gemfile.lock update
mdorf Mar 3, 2026
480a6bf
Gemfile.lock update
mdorf Mar 3, 2026
3b9db9b
Gemfile.lock update
alexskr Mar 4, 2026
829513d
Gemfile.lock update
alexskr Mar 4, 2026
60ae1ff
Gemfile.lock update
alexskr Mar 4, 2026
041553b
re-added the use of shotgun, pointed to the updated version from syph…
mdorf Mar 5, 2026
cbf73be
Gemfile.lock
mdorf Mar 6, 2026
2a04c02
Gemfile.lock update
mdorf Mar 6, 2026
b987bbd
integrate ontoportal testkit
alexskr Mar 7, 2026
e55492c
update test config file
alexskr Mar 7, 2026
6521ffe
remove TESTOPTS env var
alexskr Mar 7, 2026
12cdeec
Merge branch 'chore/ontoportal-lirmm-goo-compat' into infra/ontoporta…
alexskr Mar 9, 2026
a7f3a9d
Merge pull request #204 from ncbo/infra/ontoportal-testkit-integration
alexskr Mar 9, 2026
5e702a5
Gemfile.lock update
alexskr Mar 9, 2026
93aa0c2
Gemfile.lock update
alexskr Mar 9, 2026
388d1bd
converted acronyms filter from Boolean to Term syntax to prevent 'too…
mdorf Mar 9, 2026
440de76
Gemfile.lock update
mdorf Mar 9, 2026
09dab09
Gemfile.lock update
alexskr Mar 10, 2026
00a3dce
Gemfile.lock update
mdorf Mar 10, 2026
6cbcea5
replaced another search boolean query with a term query
mdorf Mar 10, 2026
eba9bd1
Merge branch 'chore/ontoportal-lirmm-goo-compat' of github.com:ncbo/o…
mdorf Mar 10, 2026
52b9437
Gemfile.lock update
mdorf Mar 19, 2026
eabaf34
Reset branch specified to develop
jvendetti Mar 23, 2026
236416c
Ignore Claude Code local state
jvendetti Mar 24, 2026
5a41504
Update Gemfile.lock
jvendetti Mar 24, 2026
f36af73
Gemfile.lock update
alexskr Mar 24, 2026
8bbce6f
change branch specifier for goo
alexskr Mar 25, 2026
3ab8b56
Merge branch 'develop' into chore/ontoportal-lirmm-goo-compat
mdorf Apr 1, 2026
47b935a
removed legacy Solr core names and updated to the new collection names
mdorf Apr 1, 2026
f01fa05
Merge branch 'chore/ontoportal-lirmm-goo-compat' into develop
mdorf Apr 1, 2026
d14a2b5
Gemfile.lock update
mdorf Apr 1, 2026
2299c7d
Gemfile and Gemfile.lock updates
mdorf Apr 1, 2026
58b9413
Gemfile and Gemfile.lock updates
mdorf Apr 1, 2026
90664c3
Merge branch 'develop' into feature/solrcloud-alias-indexing-codex
mdorf Apr 1, 2026
cf6e61f
Enforce slice-based access control on individual ontology endpoints
alexskr Apr 15, 2026
46f8f08
Add run_metrics to test setup for classes and recommender tests
alexskr Apr 21, 2026
2dd991a
update ontoportal testkit
alexskr Apr 21, 2026
f83aeac
Gemfile.lock update
alexskr Apr 21, 2026
7ca4a76
ontoportal testkit update
alexskr Apr 21, 2026
aecc56a
Merge branch 'develop' into feature/enforce-slice-ontology-access
alexskr Apr 21, 2026
22c7b9e
Gemfile.lock update
mdorf Apr 21, 2026
d2d054d
Merge branch 'master' into develop
mdorf Apr 21, 2026
ad51191
Gemfile.lock update
mdorf Apr 21, 2026
8f12d54
Develop -> Master merge, release v7.0.0
mdorf Apr 21, 2026
9441f41
Gemfile & Gemfile.lock update
mdorf Apr 21, 2026
3ff50f7
Use id_from_unique_attribute for slice ontology ID lookup
alexskr Apr 22, 2026
46b2372
remove unnesesary platform constrains from Gemfile
alexskr Apr 22, 2026
31bb035
re-enable newrelic
alexskr Apr 22, 2026
5504f65
re-enable newrelic
alexskr Apr 22, 2026
58cc1f9
re-enable newrelic
alexskr Apr 22, 2026
6ec8414
re-enable newrelic
alexskr Apr 22, 2026
1ac7d2f
Merge branch 'master' into develop
alexskr Apr 22, 2026
2f17144
re-enable newrelic integration (#211)
alexskr Apr 22, 2026
29acae6
Gemfile.lock update
alexskr Apr 22, 2026
b7e1036
remove agent based newrelic deployment recording
alexskr Apr 22, 2026
88d8b6c
Merge branch 'develop'
alexskr Apr 22, 2026
b68115c
remove agent based newrelic deployment recording
alexskr Apr 22, 2026
0c78ca2
Merge pull request #209 from ncbo/feature/enforce-slice-ontology-access
alexskr Apr 22, 2026
b85ee2b
fix /documentation NameError by extracting home helpers to HomeHelper
alexskr Apr 22, 2026
6303343
drop dead `cardinality` column from HomeHelper#metadata_all
alexskr Apr 22, 2026
99d0df1
swap pandoc-ruby for kramdown to render :markdown in documentation view
alexskr Apr 22, 2026
5ca5f8d
add regression tests for GET /metadata/:class
alexskr Apr 22, 2026
c37e214
resolve nested model classes in HomeHelper#metadata
alexskr Apr 23, 2026
d2e5b64
reword /metadata/:class 404 in user-facing vocabulary
alexskr Apr 23, 2026
2b105ef
broaden /metadata/:class tests; narrow 404 test to bogus-only names
alexskr Apr 23, 2026
ce24c18
Merge pull request #213 from ncbo/fix/documentation-route-namespace-i…
alexskr Apr 23, 2026
d82044c
reset branch specifier to develop
alexskr Apr 23, 2026
73f4fea
Merge pull request #215 from ncbo/develop
alexskr Apr 23, 2026
b960887
reset branch specifier to master
alexskr Apr 23, 2026
26f5508
use fix/users-endpoint-perf-with-security oLD
alexskr Apr 28, 2026
5ab66a1
Gemfile update
alexskr Apr 28, 2026
951b6c0
Gemfile update
alexskr Apr 28, 2026
14e5e23
Gemfile update
alexskr Apr 28, 2026
dc54aca
always paginate GET /users; default order_by username
mdorf Apr 28, 2026
f05f568
Gemfile.lock update
mdorf Apr 28, 2026
0875917
fix /search and /property_search 400 when acronym filter is empty
mdorf Apr 28, 2026
8828e8c
Merge pull request #216 from ncbo/fix/slow-users-endpoint
alexskr May 1, 2026
75c5a84
Merge branch 'master' into develop
alexskr May 2, 2026
a36a23c
Merge pull request #218 from ncbo/develop
alexskr May 2, 2026
4102a5b
Gemfile.lock update
mdorf May 4, 2026
af9751b
fix trailing-slash 301 redirects downgrading https to http (issue #217)
mdorf May 4, 2026
e2999da
Merge branch 'develop' into fix/trailing-slash-redirect
mdorf May 4, 2026
c2590ad
Gemfile.lock update
alexskr May 5, 2026
2d9775c
Merge pull request #219 from ncbo/fix/trailing-slash-redirect
alexskr May 5, 2026
edd3e23
Merge pull request #220 from ncbo/develop
alexskr May 5, 2026
d6209db
Gemfile & Gemfile.lock update
mdorf May 8, 2026
02ee539
resolved #221 - Too many boolean clauses search exception is thrown w…
mdorf May 9, 2026
a70ddbe
fixed #222 - NoMethodError at /annotator is thrown for certain Annota…
mdorf May 9, 2026
e828ac6
reverted changes to the /content endpoint
mdorf May 9, 2026
fe7417f
Merge pull request #223 from ncbo/fix/search-too-many-boolean-nometho…
mdorf May 11, 2026
ba62abe
Merge pull request #224 from ncbo/develop
alexskr May 11, 2026
1aa0851
reset branch specifier to master
alexskr May 11, 2026
7df8a66
Gemfile.lock update
mdorf May 11, 2026
93635a3
Expand user search fields
jvendetti May 13, 2026
ae6eed3
Preserve username-only user search default
jvendetti May 13, 2026
98a6529
Update search collection test for bootstrap collections
mdorf May 14, 2026
3973a00
Merge branch 'feature/solrcloud-alias-indexing-codex' of github.com:n…
mdorf May 14, 2026
90ec0f1
Gemfile.lock update
mdorf May 14, 2026
0e2c21b
Support all user search fields shortcut
jvendetti May 15, 2026
d4e7165
Update Solr alias dependency revisions
mdorf May 19, 2026
8906ab2
Skip minitest reporters in RubyMine
jvendetti May 19, 2026
a2b2284
Fix some RuboCop warnings
jvendetti May 19, 2026
fed67fa
Ignore Serena project metadata
jvendetti May 19, 2026
77e1ac0
Update API Solr alias dependency revisions
mdorf May 19, 2026
e6321df
Update API read-only alias dependency revisions
mdorf May 19, 2026
1088ecd
Refactor user search field parsing
jvendetti May 19, 2026
5aa9d49
Merge pull request #226 from ncbo/feature/expand-user-search/225
jvendetti May 19, 2026
d243b1e
Merge branch 'develop' into feature/solrcloud-alias-indexing-codex
mdorf May 19, 2026
0c5d519
Merge pull request #207 from ncbo/feature/solrcloud-alias-indexing-codex
mdorf May 19, 2026
95124b0
Gemfile & Gemfile.lock update
mdorf May 19, 2026
3fc1032
Merge branch 'master' into develop
mdorf May 21, 2026
1884b1d
Gemfile & Gemfile.lock update
mdorf May 22, 2026
101d0cb
Develop -> Master merge, release v7.3.0
mdorf May 22, 2026
814a527
Gemfile & Gemfile.lock update
mdorf May 22, 2026
7dad030
Gemfile.lock update
mdorf May 27, 2026
3754fff
Gemfile.lock update
mdorf May 27, 2026
302c88b
Merge branch 'master' into develop
mdorf May 27, 2026
d18ccba
Gemfile & Gemfile.lock update
mdorf May 27, 2026
9320a09
Develop -> Master merge, release v7.3.1
mdorf May 27, 2026
214795f
Gemfile & Gemfile.lock update
mdorf May 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 47 additions & 24 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,22 @@
#
# DEPLOY_ENC_KEY - key for decrypting deploymnet ssh key residing in config/deploy_id_rsa_enc (see miloserdow/capistrano-deploy)
# this SSH key is used for accessing jump host, UI nodes, and private github repo.

name: Capistrano Deployment
# Controls when the action will run.

permissions:
contents: read

on:
push:
branches:
- master
- develop
# Trigger deployment to staging after unit test action completes
workflow_run:
workflows: ["Ruby Unit Tests"]
types:
- completed
branches: [master, develop]
branches: [develop] # trigger auto deployment to staging from develop branch
# Allows running this workflow manually from the Actions tab
workflow_dispatch:
branches: [master, develop]
inputs:
BRANCH:
branch:
description: 'Branch/tag to deploy'
default: develop
required: true
Expand All @@ -46,36 +43,62 @@ on:

jobs:
deploy:
concurrency:
group: deploy
runs-on: ubuntu-latest
# run deployment only if "Ruby Unit Tests" workflow completes sucessefully or when manually triggered
if: ${{ (github.event.workflow_run.conclusion == 'success') || (github.event_name == 'workflow_dispatch') }}
# run deployment only if "Ruby Unit Tests" workflow completes sucessefully
# or when manually triggered
if: >
(github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success') ||
(github.event_name == 'workflow_dispatch')
env:
BUNDLE_WITHOUT: default #install gems required primarily for the deployment in order to speed this workflow
BUNDLE_WITHOUT: default:test:development #install gems required primarily for the deployment in order to speed this workflow
PRIVATE_CONFIG_REPO: ${{ format('git@github.com:{0}.git', secrets.CONFIG_REPO) }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: set branch/tag and environment to deploy from inputs
run: |
# workflow_dispatch default input doesn't get set on push so we need to set defaults
# via shell parameter expansion
# https://dev.to/mrmike/github-action-handling-input-default-value-5f2g
USER_INPUT_BRANCH=${{ inputs.branch }}
echo "BRANCH=${USER_INPUT_BRANCH:-develop}" >> $GITHUB_ENV
USER_INPUT_ENVIRONMENT=${{ inputs.environment }}
echo "TARGET=${USER_INPUT_ENVIRONMENT:-staging}" >> $GITHUB_ENV
if [ "${{ github.event_name }}" = "workflow_run" ]; then
# Auto: always deploy develop to staging
echo "BRANCH=develop" >> "$GITHUB_ENV"
# echo "BRANCH=${{ github.event.workflow_run.head_branch }}" >> "$GITHUB_ENV" # auto deploy from branch if needed
echo "TARGET=staging" >> "$GITHUB_ENV"
else
# Manual: use inputs, with defaulting via parameter expansion
USER_INPUT_BRANCH=${{ inputs.branch }}
USER_INPUT_ENVIRONMENT=${{ inputs.environment }}

echo "BRANCH=${USER_INPUT_BRANCH:-develop}" >> "$GITHUB_ENV"
echo "TARGET=${USER_INPUT_ENVIRONMENT:-staging}" >> "$GITHUB_ENV"
fi
- name: Provide deployment info
run: |
echo "=== Deployment Details ======================================"
echo "Time: $(date -u +"%Y-%m-%d %H:%M:%S UTC")"
echo "Branch/Tag: ${BRANCH}"
echo "Environment: ${TARGET}"
echo "Commit: ${GITHUB_SHA}"
echo "Triggered by: ${GITHUB_ACTOR}"
echo "Event: ${GITHUB_EVENT_NAME}"
if [ "${GITHUB_EVENT_NAME}" = "workflow_run" ]; then
echo "Mode: auto-deploy from develop"
else
echo "Mode: manual deployment"
fi
echo "=============================================================="
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: get-deployment-config
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: ${{ secrets.CONFIG_REPO }} # repository containing deployment settings
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
path: deploy_config
path: deploy_config
- name: copy-deployment-config
run: cp -r deploy_config/ontologies_api/* .
run: cp -r deploy_config/ontologies_api/* .
# add ssh hostkey so that capistrano doesn't complain
- name: Add jumphost's hostkey to Known Hosts
run: |
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/ruby-unit-tests.yml

This file was deleted.

87 changes: 87 additions & 0 deletions .github/workflows/testkit-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Docker Unit Tests

on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:

env:
# CI execution mode for backend tests:
# - container: run `test:docker:<backend>:container` (default)
# - native: run `test:docker:<backend>` on host Ruby
OPTK_CI_RUN_MODE: ${{ vars.OPTK_CI_RUN_MODE || 'container' }}
# Example override to force native mode in this workflow file:
# OPTK_CI_RUN_MODE: native

jobs:
prepare:
runs-on: ubuntu-latest
outputs:
backends: ${{ steps.cfg.outputs.backends }}
steps:
- uses: actions/checkout@v6

- id: cfg
name: Read backend matrix from .ontoportal-testkit.yml
run: |
BACKENDS=$(ruby -ryaml -rjson -e 'c=YAML.safe_load_file(".ontoportal-testkit.yml") || {}; b=c["backends"] || %w[fs ag vo gd]; puts JSON.generate(b)')
echo "backends=$BACKENDS" >> "$GITHUB_OUTPUT"

test:
needs: prepare
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
backend: ${{ fromJson(needs.prepare.outputs.backends) }}

steps:
- uses: actions/checkout@v6

- name: Set up Ruby from .ruby-version
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true

- name: Set up Java 11 (native mode)
if: env.OPTK_CI_RUN_MODE == 'native'
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '11'

- name: Install native system dependencies
if: env.OPTK_CI_RUN_MODE == 'native'
run: |
sudo apt-get update
sudo apt-get install -y raptor2-utils

- name: Run unit tests
env:
CI: "true"
TESTOPTS: "--verbose"
BACKEND: ${{ matrix.backend }}
run: |
MODE="${OPTK_CI_RUN_MODE:-container}"
TASK="test:docker:${BACKEND}"
if [ "$MODE" = "container" ]; then
TASK="${TASK}:container"
elif [ "$MODE" != "native" ]; then
echo "Invalid OPTK_CI_RUN_MODE=$MODE (expected container or native)"
exit 1
fi

bundle exec rake "$TASK"

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests,${{ matrix.backend }}
verbose: true
fail_ci_if_error: false
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ test/data/ontology_files/repo/**/*
.classpath
.project

# Claude Code
.claude/

# Serena
.serena/

*.swp

config/environments/console.rb
Expand Down
9 changes: 9 additions & 0 deletions .ontoportal-testkit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
component_name: ontologies_api
app_service: test-container
backends:
- fs
- ag
- vo
- gd
dependency_services:
- mgrep
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.6
3.2.10
2 changes: 1 addition & 1 deletion Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ require 'capistrano/bundler'
# require 'capistrano/rails/assets'
# require 'capistrano/rails/migrations'
require 'capistrano/locally'
require 'new_relic/recipes' # announce deployments in NewRelic

# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
30 changes: 13 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
ARG RUBY_VERSION=3.1
ARG DISTRO_NAME=bullseye
ARG RUBY_VERSION=3.2
ARG DISTRO=bullseye
ARG TESTKIT_BASE_IMAGE=ontoportal/testkit-base:ruby${RUBY_VERSION}-${DISTRO}
FROM ${TESTKIT_BASE_IMAGE}

FROM ruby:$RUBY_VERSION-$DISTRO_NAME
WORKDIR /app

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

RUN mkdir -p /srv/ontoportal/ontologies_api
RUN mkdir -p /srv/ontoportal/bundle
COPY Gemfile* /srv/ontoportal/ontologies_api/
# Respect the project's Bundler lock when present.
RUN if [ -f Gemfile.lock ]; then \
BUNDLER_VERSION=$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1 | tr -d ' '); \
gem install bundler -v "$BUNDLER_VERSION"; \
fi

WORKDIR /srv/ontoportal/ontologies_api
RUN bundle install --jobs 4 --retry 3

ENV BUNDLE_PATH=/srv/ontoportal/bundle
RUN bundle install
COPY . ./

COPY . /srv/ontoportal/ontologies_api
RUN cp /srv/ontoportal/ontologies_api/config/environments/config.rb.sample /srv/ontoportal/ontologies_api/config/environments/development.rb

EXPOSE 9393
CMD ["bundle", "exec", "rackup", "-p", "9393", "--host", "0.0.0.0"]
Loading