tmp #14
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | |
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
name: unit-tests | |
on: | |
push: | |
pull_request_target: | |
types: [ opened, reopened ] | |
env: | |
API_URL: ${{ secrets.API_URL }} | |
API_KEY: ${{ secrets.API_KEY }} | |
BIOMIXER_URL: ${{ secrets.BIOMIXER_URL }} | |
FAIRNESS_URL: ${{ secrets.FAIRNESS_URL }} | |
ANNOTATOR_URL: ${{ secrets.ANNOTATOR_URL }} | |
DB_HOST: ${{ secrets.DB_HOST || '127.0.0.1' }} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7.6 # Not needed with a .ruby-version file | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: set up config file | |
run: cp .env.sample .env && cp config/database.yml.sample config/database.yml | |
- name: build docker | |
run: docker compose --profile cache-db up -d | |
- name: run test docker | |
run: bin/rails test -v |