diff --git a/.circleci/config.yml b/.circleci/config.yml index a4ee0a9..c31ce0d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,14 @@ version: 2 jobs: - build: + deploy: + docker: + - image: 'circleci/node:latest' + steps: + - checkout + - run: + name: release + command: ./scripts/deploy.sh + tests: docker: - image: 'circleci/node:latest' steps: @@ -9,5 +17,32 @@ jobs: name: install command: npm install - run: - name: release - command: npm run semantic-release + name: checks script + command: ./scripts/checks.sh + integration-test: + docker: + - image: 'circleci/node:latest' + steps: + - checkout + - run: + name: install + command: npm install + # TODO: Add IT +workflows: + deploy: + jobs: + - deploy: + filters: + branches: + only: master + - tests: + filters: + branches: + ignore: master + - integration-test: + requires: + - tests + filters: + branches: + ignore: master + version: 2 \ No newline at end of file diff --git a/scripts/checks.sh b/scripts/checks.sh index 795b8ba..353f9bc 100755 --- a/scripts/checks.sh +++ b/scripts/checks.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e + npm run ts npm run prettier:check npm run lint:fix diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100755 index 0000000..e1ba755 --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -e + +npm i +npm run build +npm run semantic-release \ No newline at end of file