mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-23 05:52:42 -05:00
Setup initial circleCI config with build-test job
This commit is contained in:
parent
52b522bae4
commit
61691b1b4e
1 changed files with 49 additions and 0 deletions
49
.circleci/config.yml
Normal file
49
.circleci/config.yml
Normal file
|
@ -0,0 +1,49 @@
|
|||
version: 2.1
|
||||
aliases:
|
||||
- &defaults
|
||||
docker:
|
||||
- image: cimg/node:12-browsers
|
||||
working_directory: ~/repo
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
RELEASE_TIMESTAMP: "$(date +'%Y%m%d%H%M%S')"
|
||||
- &setup
|
||||
name: "setup"
|
||||
command: |
|
||||
npm --production=false ci
|
||||
mkdir ./test/results
|
||||
- &lint
|
||||
name: "run lint tests"
|
||||
command: npm run lint
|
||||
- &unit
|
||||
name: "run unit tests"
|
||||
command: npm run unit
|
||||
- &build
|
||||
name: "run npm build"
|
||||
command: |
|
||||
NODE_ENV=production npm run build
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
<<: *setup
|
||||
- run:
|
||||
<<: *lint
|
||||
- run:
|
||||
<<: *unit
|
||||
- run:
|
||||
<<: *build
|
||||
|
||||
workflows:
|
||||
build-test-no-deploy:
|
||||
jobs:
|
||||
- build-test:
|
||||
filters:
|
||||
branches:
|
||||
ignore:
|
||||
- master
|
||||
- develop
|
||||
- /^hotfix\/.*/
|
Loading…
Reference in a new issue