Skip to content

Commit

Permalink
Merge branch 'master' into FEQ-1990-Transfer-file-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
heorhi-deriv authored Apr 19, 2024
2 parents 459f8cb + 66d41ec commit 8204f13
Show file tree
Hide file tree
Showing 12 changed files with 8,569 additions and 2,175 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Publish to NPM
on:
push:
branches:
- master
- next
- next-major
- alpha
- beta
- development

jobs:
build_and_publish_npm:
name: Release
runs-on: ubuntu-latest
environment: Production
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: '20'
- name: Update to latest npm (temporary fix for audit below)
run: npm install --global npm
- name: Install dependencies
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Prepublish
run: npm run prepublish
- name: Release
if: success()
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN}}
run: npx semantic-release
17 changes: 5 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
name: Run Unit Tests
name: Test Workflow

on:
pull_request:
on: ["push", "pull_request"]

jobs:
test:
runs-on: ubuntu-latest
permissions:
# Required to checkout the code
contents: read
# Required to put a comment into the pull-request
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
Expand All @@ -22,6 +15,6 @@ jobs:
- name: Install dependencies
run: npm install
- name: Run tests
run: npx vitest run --coverage.enabled --coverage.provider=v8 --coverage.reporter=json-summary --coverage.reporter=json
- name: Report Coverage
uses: davelosert/vitest-coverage-report-action@v2
run: npm run test:coverage
- name: Coveralls
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run commitlint ${1}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm test
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Deriv Utility Library (@deriv/utils)

[npm-image]: https://img.shields.io/npm/v/@deriv-com/utils.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@deriv-com/utils

[![npm][npm-image]][npm-url]
[![Coverage Status](https://coveralls.io/repos/github/deriv-com/deriv-utils/badge.svg)](https://coveralls.io/github/deriv-com/deriv-utils)

## Overview

This utility library provides a comprehensive suite of utilities designed to support the development of web applications for Deriv. It encapsulates common functionalities such as handling constants, formatting, sorting, and more, with a focus on enhancing development efficiency and ensuring type safety.
Expand Down
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default { extends: ["@commitlint/config-conventional"] };
Loading

0 comments on commit 8204f13

Please sign in to comment.