Skip to content

Commit f18c114

Browse files
authored
chore(ci): setup cypress (#206)
* rename for clarity * add simple cypress test suite for web platform * setup circleci
1 parent 8530621 commit f18c114

File tree

29 files changed

+1246
-25
lines changed

29 files changed

+1246
-25
lines changed

.circleci/config.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,40 @@ jobs:
4141
- run: yarn build
4242
- save-cache: *save-cache
4343

44+
Web Platform Tests:
45+
docker:
46+
- image: circleci/node:8-browsers
47+
steps:
48+
- checkout
49+
- restore-cache: *restore-cache
50+
- *install
51+
- run: yarn build:umd
52+
- *cypress-dependencies-install
53+
- restore-cache:
54+
keys:
55+
- v5-tests-web-platform-dependencies-{{ .Branch }}-{{ checksum "tests/web-platform/yarn.lock" }}
56+
# Fallback in case checksum fails
57+
- v5-tests-web-platform-dependencies-{{ .Branch }}-
58+
- run:
59+
command: yarn install --no-progress
60+
working_directory: tests/web-platform
61+
- run:
62+
command: yarn start
63+
background: true
64+
working_directory: tests/web-platform
65+
- run: npx wait-on http://localhost:3000
66+
- run:
67+
command: yarn test
68+
working_directory: tests/web-platform
69+
- store_test_results:
70+
path: tests/web-platform/junit
71+
- store_artifacts:
72+
path: tests/web-platform/cypress/screenshots
73+
- save-cache:
74+
paths:
75+
- tests/web-platform/node_modules
76+
key: v5-tests-web-platform-dependencies-{{ .Branch }}-{{ checksum "tests/web-platform/yarn.lock" }}
77+
4478
Semantic Release:
4579
docker:
4680
- image: circleci/node:8
@@ -57,10 +91,12 @@ workflows:
5791
jobs:
5892
- Typecheck
5993
- Build
94+
- Web Platform Tests
6095
- Semantic Release:
6196
requires:
6297
- Typecheck
6398
- Build
99+
- Web Platform Tests
64100
filters:
65101
branches:
66102
only:

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
node_modules
2+
3+
# Cypress stuff
4+
**/cypress/screenshots
5+
**/cypress/videos
6+
27
lerna-debug.log
38
.next
49
dist

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ release.
1616
## Install
1717

1818
```bash
19-
yarn add scroll-into-view-if-needed
19+
yarn add scroll-into-view-if-needed@next
2020
```
2121

2222
## Usage

integration-tests/web-platform-tests/package.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

lerna.json

Lines changed: 0 additions & 7 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)