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
9 changes: 9 additions & 0 deletions .github/workflows/reusable-test-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,12 @@ jobs:
DIR_CHART_VERSION: ${{ inputs.dir_chart_version }}
DIRCTL_IMAGE_TAG: ${{ inputs.dirctl_image_tag }}
run: task test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6.0.2
with:
files: coverage/lcov.info
flags: integration
codecov_yml_path: codecov.yml
use_oidc: true
verbose: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# JS
node_modules/
dist/
coverage/

# MacOS
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Directory JavaScript SDK

[![npm version](https://img.shields.io/npm/v/agntcy-dir.svg)](https://www.npmjs.com/package/agntcy-dir)

[![Coverage](https://codecov.io/gh/agntcy/dir-sdk-javascript/branch/main/graph/badge.svg)](https://codecov.io/gh/agntcy/dir-sdk-javascript)
## Overview

Dir JavaScript SDK provides a simple way to interact with the Directory API.
Expand Down
4 changes: 3 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version: "3"

vars:
DIR_CHART_VERSION: '{{ .DIR_CHART_VERSION | default "v1.5.0" }}'
DIR_IMAGE_TAG: '{{ .DIR_IMAGE_TAG | default "v1.5.0" }}'
DIRCTL_IMAGE_TAG: '{{ .DIRCTL_IMAGE_TAG | default "v1.5.0" }}'

# renovate: datasource=github-releases depName=renovatebot/renovate versioning=semver
Expand Down Expand Up @@ -124,7 +125,7 @@ tasks:
export COSIGN_PATH="$(printf "%s" "${COSIGN_PATH:-{{ .COSIGN_BIN }}}")"

# Run SDK tests
npm run test
npm run test:coverage

# Run SDK example to verify it works
cd {{ .ROOT_DIR }}/examples
Expand Down Expand Up @@ -219,6 +220,7 @@ tasks:

{{ .HELM_BIN }} install dir oci://ghcr.io/agntcy/dir/helm-charts/dir \
--version="{{ .DIR_CHART_VERSION }}" \
--set apiserver.image.tag="{{ .DIR_IMAGE_TAG }}" \
--set apiserver.image.pullSecrets="" \
--set apiserver.service.type="NodePort" \
--set apiserver.service.nodePort="{{.API_NODEPORT}}" \
Expand Down
35 changes: 35 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
codecov:
require_ci_to_pass: false
notify:
after_n_builds: 1

comment:
layout: "files,diff,flags,tree"
hide_project_coverage: false
require_changes: false
require_base: false
require_head: true
behavior: default

coverage:
precision: 1
round: nearest
range: 40..90
status:
project:
default:
target: auto
threshold: 2%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true
changes: false

ignore:
- "test/**"
- "examples/**"
- "dist/**"
- "src/**/models/**"
Loading
Loading