Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
version: 2.1

orbs:
codecov: codecov/codecov@5.0.3

executors:
default:
working_directory: ~/sdk
docker:
- image: cimg/node:18.18.0

jobs:
test:
executor: default
steps:
- checkout
- restore_cache:
key: dependency-cache-v1-{{ checksum "package.json" }}
- run:
name: Install packages
command: npm install
- save_cache:
key: dependency-cache-v1-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: Run unit tests with coverage
command: npm run test:CI || true
- codecov/upload:
token: CODECOV_TOKEN
slug: trolley/javascript-sdk
files: coverage/lcov.info
when: always

build:
executor: default
steps:
Expand Down Expand Up @@ -35,10 +60,22 @@ jobs:
workflows:
build-test:
jobs:
- build
- test:
context: org-global
filters:
tags:
ignore: /.*/
- build:
requires:
- test
filters:
tags:
ignore: /.*/
publish-deploy:
jobs:
- publish:
filters:
branches:
only: master
ignore: /.*/
tags:
only: /^v.*/
25 changes: 25 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
codecov:
require_ci_to_pass: true
notify:
after_n_builds: 1
wait_for_ci: true
allow_coverage_offsets: true
ci:
- circleci.com

coverage:
precision: 2
round: down
range: "70...100"
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: 80%

comment:
layout: "reach, diff, flags, files"
behavior: default
Loading