Skip to content

Commit 49ba62d

Browse files
authored
chore: Adding E2E tests (#151)
## Summary React SDK contains unit tests but its not possible to cover many scenarios using those. We have started working on an E2E test suite in a private repo [here](https://github.com/optimizely/react-sdk-e2e-tests). This PR enables this repo to trigger E2E tests on PRs. E2E test suite is not complete yet, so we are not making the check mandatory. Once we have something significant in that repo, we will make this check mandatory. Since we were working in the travis config file, we cleaned it up a bit and removed the unnecessary markdown lint which has already been removed from other repos. ## Test Plan Tested the triggering mechanism thoroughly and it appears to be working fine.
1 parent d19a16a commit 49ba62d

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

.travis.yml

+16-9
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,12 @@ language: generic
22
os: linux
33

44
stages:
5-
- 'Lint markdown files'
65
- 'Test'
6+
- 'Integration tests'
77
- 'Publish'
88

99
jobs:
1010
include:
11-
- stage: 'Lint markdown files'
12-
os: linux
13-
language: generic
14-
install: gem install awesome_bot
15-
before_script: skip
16-
script:
17-
- find . -type f -name '*.md' -exec awesome_bot {} \;
18-
1911
- stage: 'Test'
2012
os: linux
2113
language: node_js
@@ -25,6 +17,21 @@ jobs:
2517
addons:
2618
srcclr: true
2719

20+
- stage: 'Integration tests'
21+
language: minimal
22+
env:
23+
SDK: react
24+
SDK_BRANCH: ${TRAVIS_PULL_REQUEST_BRANCH}
25+
# Need to provide REPO_SLUG here otherwise it defaults to Fullstack suite repos.
26+
REPO_SLUG: optimizely/react-sdk-e2e-tests
27+
before_install: skip
28+
install: skip
29+
before_script:
30+
- mkdir $HOME/travisci-tools && pushd $HOME/travisci-tools && git init && git pull https://[email protected]/optimizely/travisci-tools.git && popd
31+
script:
32+
- $HOME/travisci-tools/trigger-script-with-status-update.sh main
33+
after_success: travis_terminate 0
34+
2835
- stage: 'Publish'
2936
if: type = push AND tag IS present AND tag =~ /^[0-9]+\.[0-9]+\.[0-9]+/
3037
name: publish to github release

0 commit comments

Comments
 (0)