Feature: Sync annotator code with NCBO code #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ruby Unit Tests | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
backend: ['ruby', 'ruby-agraph'] # api runs tests with 4store backend and api-agraph runs with AllegroGraph backend | |
steps: | |
- uses: actions/checkout@v3 | |
- name: copy config file | |
run: cp config/config.test.rb config/config.rb | |
- name: Build docker-compose | |
run: docker-compose build | |
- name: Run unit tests | |
# unit tests are run inside a container | |
# http://docs.codecov.io/docs/testing-with-docker | |
run: | | |
ci_env=`bash <(curl -s https://codecov.io/env)` | |
docker-compose run $ci_env -e CI ${{ 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) |