Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
Use TEST_SUITE env var to run ruby/js specs
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Jan 27, 2021
1 parent 8985419 commit c05048b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 26 deletions.
41 changes: 15 additions & 26 deletions .travis.yml
@@ -1,26 +1,15 @@
matrix:
include:
- name: "Node.js: 12"
language: node_js
cache: yarn
node_js:
- '12' # current stable
script: yarn test --runInBand
- name: "Ruby: 2.5.8"
language: ruby
cache: bundler
rvm:
- 2.5.8
addons:
postgresql: '10'
install: bin/setup
after_script: bin/ci/after_script
- name: "Ruby: 2.6.6"
language: ruby
rvm:
- 2.6.6
cache: bundler
addons:
postgresql: '10'
install: bin/setup
after_script: bin/ci/after_script
---
language: ruby
cache:
- bundler
- yarn
addons:
postgresql: '10'
env:
matrix:
- TEST_SUITE=javascript
- TEST_SUITE=rails
before_install: source bin/ci/before_install.sh
install: source bin/ci/install.sh
script: source bin/ci/script.sh
after_script: bin/ci/after_script
5 changes: 5 additions & 0 deletions bin/ci/before_install.sh
@@ -0,0 +1,5 @@
if [ "$TEST_SUITE" = "javascript" ]
then
source ~/.nvm/nvm.sh
nvm install 12
fi
6 changes: 6 additions & 0 deletions bin/ci/install.sh
@@ -0,0 +1,6 @@
if [ "$TEST_SUITE" = "javascript" ]
then
npm install
else
bin/setup
fi
8 changes: 8 additions & 0 deletions bin/ci/script.sh
@@ -0,0 +1,8 @@
#!/bin/bash

if [ "$TEST_SUITE" = "javascript" ]
then
yarn test --runInBand
else
bundle exec rake
fi

0 comments on commit c05048b

Please sign in to comment.