Browse Source

Merge pull request #1 from Anatole-DC/adding_ci

feat: adding the config file for ci
main
Anatole De Chauveron 5 years ago
committed by GitHub
parent
commit
efe352c038
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 109
      .circleci/config.yml

109
.circleci/config.yml

@ -0,0 +1,109 @@
version: 2.1
jobs:
build:
docker:
- image: cimg/node:16.10.0
auth:
username: adechauveron
password: $DOCKER_PASSWORD
steps:
- checkout
- run:
name: "Hello World"
command: echo "Hello World"
- restore_cache:
keys:
- npm-v2-dependencies-{{ checksum "yarn.lock" }}
- npm-v2-dependencies-
- run:
name: "yarn install"
command: yarn install
- save_cache:
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
paths:
- node_modules
lint:
docker:
- image: cimg/node:16.10.0
auth:
username: adechauveron
password: $DOCKER_PASSWORD
steps:
- checkout
- restore_cache:
keys:
- npm-v2-dependencies-{{ checksum "yarn.lock" }}
- npm-v2-dependencies-
- run:
name: "lint step"
command: |
yarn lint
yarn format:check
- run:
name: "yarn test"
command: yarn test
end_to_end_tests:
docker:
- image: cimg/node:16.10.0
auth:
username: adechauveron
password: $DOCKER_PASSWORD
- image: circleci/postgres:9.6.2-alpine
auth:
username: adechauveron
password: $DOCKER_PASSWORD
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
steps:
- checkout
- restore_cache:
keys:
- npm-v2-dependencies-{{ checksum "yarn.lock" }}
- npm-v2-dependencies-
- run:
name: "yarn test"
command: yarn test:e2e
environment:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
documentation_artifact:
docker:
- image: cimg/node:16.10.0
auth:
username: adechauveron
password: $DOCKER_PASSWORD
steps:
- checkout
- restore_cache:
keys:
- npm-v2-dependencies-{{ checksum "yarn.lock" }}
- npm-v2-dependencies-
- run:
name: "yarn doc build"
command: |
yarn doc:build
yarn add save-artifact-to-github
- store_artifacts:
path: docs
workflows:
version: 2
build_and_test:
jobs:
- build
- lint:
requires:
- build
- end_to_end_tests:
requires:
- build
- documentation_artifact:
requires:
- end_to_end_tests
- lint
Loading…
Cancel
Save