Repository navigation
75 lines (69 loc) · 3.01 KB
/
Copy pathbuild-test.yml
File metadata and controls
75 lines (69 loc) · 3.01 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# 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: Build and Test
on:
push:
branches: [ '**' ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_test:
name: Build and Test on Ruby ${{ matrix.ruby-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
ruby-version: ['2.5', '2.6']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
# change this to (see https://github.com/ruby/setup-ruby#versioning):
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Execute Ruby unit tests with code coverage
if: matrix.ruby-version == '2.6'
env:
COVERAGE: true
run: bundle exec rake test:unit
- name: Execute Ruby unit tests
if: matrix.ruby-version != '2.6'
run: bundle exec rake test:unit
- name: Execute Ruby integration tests
env:
NATURAL_LANGUAGE_CLASSIFIER_URL: ${{ secrets.NLC_URL }}
NATURAL_LANGUAGE_CLASSIFIER_APIKEY: ${{ secrets.NLC_KEY }}
NATURAL_LANGUAGE_UNDERSTANDING_URL: ${{ secrets.NLU_URL }}
NATURAL_LANGUAGE_UNDERSTANDING_APIKEY: ${{ secrets.NLU_KEY }}
LANGUAGE_TRANSLATOR_URL: ${{ secrets.LT_URL }}
LANGUAGE_TRANSLATOR_APIKEY: ${{ secrets.LT_KEY }}
PERSONALITY_INSIGHTS_URL: ${{ secrets.PI_URL }}
PERSONALITY_INSIGHTS_APIKEY: ${{ secrets.PI_KEY }}
SPEECH_TO_TEXT_URL: ${{ secrets.STT_URL }}
SPEECH_TO_TEXT_APIKEY: ${{ secrets.STT_KEY }}
TEXT_TO_SPEECH_URL: ${{ secrets.TTS_URL }}
TEXT_TO_SPEECH_APIKEY: ${{ secrets.TTS_KEY }}
TONE_ANALYZER_URL: ${{ secrets.TA_URL }}
TONE_ANALYZER_APIKEY: ${{ secrets.TA_KEY }}
VISUAL_RECOGNITION_URL: ${{ secrets.VR_URL }}
VISUAL_RECOGNITION_APIKEY: ${{ secrets.VR_KEY }}
VISUAL_RECOGNITION_COLLECTION_ID: ${{ secrets.VR_COLID }}
COMPARE_COMPLY_URL: ${{ secrets.CC_URL }}
COMPARE_COMPLY_APIKEY: ${{ secrets.CC_KEY }}
COMPARE_COMPLY_FEEDBACK_ID: ${{ secrets.CC_FEEDID }}
ASSISTANT_URL: ${{ secrets.WA_URL }}
ASSISTANT_APIKEY: ${{ secrets.WA_KEY }}
ASSISTANT_WORKSPACE_ID: ${{ secrets.WA_WORKID }}
ASSISTANT_ASSISTANT_ID: ${{ secrets.WA_ASSTID }}
DISCOVERY_URL: ${{ secrets.DSC_URL }}
DISCOVERY_APIKEY: ${{ secrets.DSC_KEY }}
DISCOVERY_ENVIRONMENT_ID: ${{ secrets.DSC_ENVID }}
DISCOVERY_COLLECTION_ID: ${{ secrets.DSC_COLLID }}
run: bundle exec rake test:integration