-
Notifications
You must be signed in to change notification settings - Fork 86
/
run_tests.sh
executable file
·44 lines (34 loc) · 1.08 KB
/
run_tests.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#! /bin/bash
RAILS_ENV=test
NODE_ENV=test
/wait_for_postgres.sh
# prepare configs
cp config/bpm.yml.sample config/bpm.yml
cp config/database.yml.sample config/database.yml
cp config/secrets.yml.sample config/secrets.yml
cp config/cable.yml.sample config/cable.yml
cp config/hbw.yml.sample config/hbw.yml
echo "sources:
bpmanagementsystem:
type: 'static/bpm'
" > config/sources.yml
bundle exec rake db:migrate
bundle exec rake db:seed SEED_DB=true
# add source billing for tests
echo "sources:
bpmanagementsystem:
type: 'static/bpm'
billing:
type: sql/oracle
tns_name: test
username: test
password: test
" > config/sources.yml
bundle exec rspec ./spec --format RspecJunitFormatter --out test-reports/out.xml --format progress
rubocop --display-only-failed --format junit --out test-reports/rubocop.xml
JEST_JUNIT_OUTPUT_NAME=./test-reports/jest.xml yarn test --ci --reporters=default --reporters=jest-junit
zip -r coverage.zip coverage/
if [ "$GENERATE_DOC" = 'true' ]; then
export GENERATING_DOC=true
bundle exec rake docs:generate && zip -r doc.zip public/doc;
fi