Files
callstack__react-native-tes…/.circleci/config.yml
T

87 lines
2.1 KiB
YAML
Raw Normal View History

2018-10-06 19:25:51 +02:00
version: 2
aliases:
- &filter-only-master
branches:
only:
- master
2018-10-06 19:25:51 +02:00
defaults: &defaults
docker:
- image: circleci/node:10
working_directory: ~/react-native-testing-library
jobs:
install-dependencies:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/react-native-testing-library
- restore_cache:
keys:
- dependencies-{{ checksum "yarn.lock" }}
- run: yarn install --frozen-lockfile --no-progress --non-interactive --cache-folder ~/.cache/yarn
2018-10-06 19:25:51 +02:00
- save_cache:
key: dependencies-{{ checksum "yarn.lock" }}
2018-10-06 19:25:51 +02:00
paths:
- ~/.cache/yarn
2018-10-06 19:25:51 +02:00
- persist_to_workspace:
root: .
paths:
- .
lint-and-flow:
<<: *defaults
steps:
- attach_workspace:
at: ~/react-native-testing-library
- run: |
yarn lint
yarn flow-check
2018-10-07 22:32:12 +02:00
typescript:
<<: *defaults
steps:
- attach_workspace:
at: ~/react-native-testing-library
- run: |
yarn typescript-check
2018-10-06 19:25:51 +02:00
tests:
<<: *defaults
steps:
- attach_workspace:
at: ~/react-native-testing-library
- run: yarn test
- store_artifacts:
path: coverage
destination: coverage
deploy-website:
<<: *defaults
steps:
- checkout
- run:
name: Deploying to GitHub Pages
command: |
git config --global user.email "thymikee@users.noreply.github.com"
git config --global user.name "Michał Pierzchała"
echo "machine github.com login thymikee password $GITHUB_TOKEN" > ~/.netrc
cd website && yarn install && GIT_USER=thymikee yarn run publish-gh-pages
2018-10-06 19:25:51 +02:00
workflows:
version: 2
build-and-test:
jobs:
- install-dependencies
- lint-and-flow:
requires:
- install-dependencies
2018-10-07 22:32:12 +02:00
- typescript:
requires:
- install-dependencies
2018-10-06 19:25:51 +02:00
- tests:
requires:
- install-dependencies
- deploy-website:
requires:
- install-dependencies
filters: *filter-only-master