Skip to content

Commit

Permalink
Migrate to CircleCI2.0 and Add AppVeyor for master-only branch (#11605)
Browse files Browse the repository at this point in the history
* add appveyor config file

* migrate circleci 1.0 to circleci 2.0

* remove upload step in favour of #11666
  • Loading branch information
raphamorim authored and gaearon committed Nov 28, 2017
1 parent 7788bcd commit a2b6b6b
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 34 deletions.
50 changes: 50 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,50 @@
version: 2
jobs:
build:

docker:
- image: circleci/node:8

environment:
TZ: /usr/share/zoneinfo/America/Los_Angeles
YARN_VERSION: 1.2.1
TRAVIS_REPO_SLUG: facebook/react

parallelism: 4

steps:
- checkout

- run: echo $CIRCLE_COMPARE_URL | cut -d/ -f7

- run:
name: Install Yarn
command: |
if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
fi
- restore_cache:
name: Restore node_modules cache
keys:
- v1-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
- v1-node-{{ arch }}-{{ .Branch }}-
- v1-node-{{ arch }}-

- run:
name: Nodejs Version
command: node --version

- run:
name: Install Packages
command: yarn install

- run:
name: Test Packages
command: ./scripts/circleci/test_entry_point.sh

- save_cache:
name: Save node_modules cache
key: v1-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules
37 changes: 37 additions & 0 deletions appveyor.yml
@@ -0,0 +1,37 @@
image: Visual Studio 2017

# Fix line endings in Windows. (runs before repo cloning)
init:
- git config --global core.autocrlf input

environment:
matrix:
- nodejs_version: 8

# Finish on first failed build
matrix:
fast_finish: true

platform:
- x64

branches:
only:
- master

# Disable Visual Studio build and deploy
build: off
deploy: off

install:
- ps: Install-Product node $env:nodejs_version $env:platform
- yarn install

test_script:
- node --version
- yarn build
- yarn test

cache:
- node_modules
- "%LOCALAPPDATA%/Yarn"
34 changes: 0 additions & 34 deletions circle.yml

This file was deleted.

0 comments on commit a2b6b6b

Please sign in to comment.