forked from ontoportal/ontologies_api
-
Notifications
You must be signed in to change notification settings - Fork 10
30 lines (28 loc) · 1009 Bytes
/
ruby-unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Ruby Unit Tests
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
backend: ['api', 'api-agraph'] # api runs tests with 4store backend and api-agraph runs with AllegroGraph backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build docker-compose
run: docker-compose --profile 4store build #profile flag is set in order to build all containers in this step
- 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 --rm ${{ matrix.backend }} bundle exec rake test TESTOPTS='-v'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
verbose: true
fail_ci_if_error: false # optional (default = false)