Skip to content

Commit

Permalink
ci: update config with new orb setup
Browse files Browse the repository at this point in the history
  • Loading branch information
sebinbenjamin committed Aug 10, 2024
1 parent 703e403 commit 707b6d1
Showing 1 changed file with 25 additions and 44 deletions.
69 changes: 25 additions & 44 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,35 @@
version: 2
version: 2.1

orbs:
node: circleci/[email protected]

jobs:
build:
docker:
- image: circleci/node:10
environment:
CODECOV_TOKEN: 5aade52f-653e-4539-aa00-137db7c15586
working_directory: ~/repo
build_and_test:
executor: node/default
environment:
CODECOV_TOKEN: 5aade52f-653e-4539-aa00-137db7c15586
steps:
- checkout
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
test:
docker:
- image: circleci/node:10
environment:
CODECOV_TOKEN: 5aade52f-653e-4539-aa00-137db7c15586
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- node/install-packages:
pkg-manager: npm
- run:
command: npm run lint
name: Lint code
- run:
name: commitlint
command: ./node_modules/.bin/commitlint --from HEAD~1 --to HEAD --verbose

# TODO: Enforce eslint, commit message format, run coverage checks
# TODO: Add awesome_bot to check URLs in markdown files
# https://github.com/dkhamsing/awesome_bot
# machine:
# ruby:
# version: 2.4.1
# test:
# pre:
# - gem install awesome_bot
# override:
# - awesome_bot README.md
name: Commit Linting
- run:
command: npm run test
name: Run tests
- persist_to_workspace:
root: ~/repo
paths: .

workflows:
version: 2
build-and-test:
build_and_test_workflow:
jobs:
- build
- test:
requires:
- build
- build_and_test:
filters:
branches:
ignore: master
ignore:
- master

0 comments on commit 707b6d1

Please sign in to comment.