mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 20:53:24 +10:00
Merge pull request #556 from sharetribe/circle-ci-2
Switch to CircleCI 2
This commit is contained in:
commit
94700e19a2
2 changed files with 43 additions and 31 deletions
43
.circleci/config.yml
Normal file
43
.circleci/config.yml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: node:6.11.5
|
||||
environment:
|
||||
YARN_VERSION: 1.2.1
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: yarn-cache
|
||||
- run:
|
||||
name: set PATH
|
||||
command: echo 'export PATH="${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"' >> $BASH_ENV
|
||||
- run:
|
||||
name: install yarn
|
||||
command: |
|
||||
if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
|
||||
echo "Downloading and installing Yarn"
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
|
||||
else
|
||||
echo "The correct version of Yarn is already installed"
|
||||
fi
|
||||
- run:
|
||||
name: yarn
|
||||
command: yarn
|
||||
- save_cache:
|
||||
key: yarn-cache
|
||||
paths:
|
||||
- ~/.cache/yarn
|
||||
- ~/.yarn
|
||||
- run:
|
||||
name: audit
|
||||
command: yarn run audit
|
||||
- run:
|
||||
name: format-ci
|
||||
command: yarn run format-ci
|
||||
- run:
|
||||
name: build
|
||||
command: yarn run build
|
||||
- run:
|
||||
name: test
|
||||
command: yarn run test-ci
|
||||
31
circle.yml
31
circle.yml
|
|
@ -1,31 +0,0 @@
|
|||
# https://circleci.com/docs/install-and-use-yarn/
|
||||
|
||||
machine:
|
||||
node:
|
||||
version: 6.11.5
|
||||
environment:
|
||||
YARN_VERSION: 1.2.1
|
||||
PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
|
||||
|
||||
dependencies:
|
||||
pre:
|
||||
- |
|
||||
if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
|
||||
echo "Downloading and installing Yarn"
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
|
||||
else
|
||||
echo "The correct version of Yarn is already installed"
|
||||
fi
|
||||
override:
|
||||
- yarn
|
||||
cache_directories:
|
||||
- ~/.cache/yarn
|
||||
- ~/.yarn
|
||||
|
||||
test:
|
||||
pre:
|
||||
- yarn run audit
|
||||
- yarn run format-ci
|
||||
- yarn run build
|
||||
override:
|
||||
- yarn run test-ci
|
||||
Loading…
Add table
Reference in a new issue