Skip to content

tmp

tmp #22

Workflow file for this run

# 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 }}

Check failure on line 22 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / unit-tests

Invalid workflow file

The workflow is not valid. .github/workflows/tests.yml (Line: 22, Col: 12): Unexpected symbol: '127.0.0.1'. Located at position 20 within expression: secrets.DB_HOST || 127.0.0.1
DB_PORT: ${{ secrets.DB_PORT || 3306 }}
DATABASE_URL: "mysql2://root:bp_user@localhost:3306/bioportal_ui_test"
RAILS_ENV: test
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: Set up database schema
run: RAILS_ENV=test bin/rails db:schema:load
- name: run test docker
run: RAILS_ENV=test bin/rails test -v