This repository has been archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from chanind/ci
feat: setting up CI and semantic-release
- Loading branch information
Showing
5 changed files
with
2,606 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:10 | ||
|
||
working_directory: ~/repo | ||
|
||
steps: | ||
- checkout | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: yarn install | ||
|
||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package.json" }} | ||
|
||
- run: yarn lint | ||
- run: yarn test | ||
- run: if [ "$CIRCLE_BRANCH" = "master" ]; then yarn semantic-release; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const _ = require('./utils') | ||
|
||
test('render', async () => { | ||
const componentId = _.load('hanzi-writer-view', 'comp'); | ||
const component = _.render(componentId, { width: 200, height: 200 }); | ||
|
||
const parent = document.createElement('parent-wrapper'); | ||
component.attach(parent); | ||
|
||
expect(_.match(component.dom, '<wx-view class="comp--container" style="width: 200px; height: 200px;"><wx-canvas style="width: 200px; height: 200px;"></wx-canvas></wx-view>')).toBe(true); | ||
}); | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.