Browse Source

Merge pull request #8 from jootha/circleci-project-setup

Circleci project setup
pull/1/merge
LecomteAdrien 6 years ago
committed by GitHub
parent
commit
0a398cb1cb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 53
      .circleci/config.yml
  2. 5
      package.json

53
.circleci/config.yml

@ -1,12 +1,49 @@
version: 2.1
workflows:
build_and_test:
jobs:
- build
- lint:
requires:
- build
- tests:
requires:
- build
jobs:
build:
docker:
- image: cimg/node:14.10.1 # the primary container, where your job's commands are run
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
docker:
- image: cimg/node:14.10.1
steps:
- checkout # check out the code in the project directory
- run: echo "hello world" # run the `echo` command qsdsqd
- checkout
- restore_cache:
key: yarn-packages-v3{{ checksum "yarn.lock" }}
- run: yarn global add node-gyp && yarn install
- save_cache:
key: yarn-packages-v3{{ checksum "yarn.lock" }}
paths:
- ./node_modules
tests:
docker:
- image: cimg/node:14.10.1
steps:
- checkout
- restore_cache:
key: yarn-packages-v3{{ checksum "yarn.lock" }}
- run: yarn test:ci
- save_cache:
key: yarn-packages-v3{{ checksum "yarn.lock" }}
paths:
- ./node_modules
lint:
docker:
- image: cimg/node:14.10.1
steps:
- checkout
- restore_cache:
key: yarn-packages-v3{{ checksum "yarn.lock" }}
- run: yarn lint && yarn format:check
- save_cache:
key: yarn-packages-v3{{ checksum "yarn.lock" }}
paths:
- ./node_modules

5
package.json

@ -20,9 +20,8 @@
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"./**/*.{yaml,yml}\"",
"format:check": "prettier --list-different \"src/**/*.ts\" \"test/**/*.ts\" \"./**/*.{yaml,yml}\"",
"generate": "hygen"
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"format:check": "prettier --list-different \"src/**/*.ts\" \"test/**/*.ts\""
},
"dependencies": {
"@hapi/joi": "^16.1.5",

Loading…
Cancel
Save