-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- adds missing exports - patches DecCoin.encode to input a float
- Loading branch information
1 parent
3563110
commit 279f807
Showing
30 changed files
with
14,007 additions
and
6,803 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Release TypeScript NPM Package | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check for changes | ||
uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
ts: | ||
- 'ts/**' | ||
- name: Setup Node.js | ||
if: steps.changes.outputs.ts == 'true' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.8.1 | ||
cache: npm | ||
cache-dependency-path: ts/package-lock.json | ||
|
||
- name: Restore node_modules cache | ||
id: deps-cache | ||
if: steps.changes.outputs.ts == 'true' && steps.deps-cache.outputs.cache-hit != 'true' | ||
uses: martijnhols/actions-cache/restore@v3 | ||
with: | ||
path: ts/node_modules | ||
key: ${{ runner.os }}-build-ts-deps-cache-${{ hashFiles('ts/package-lock.json') }} | ||
|
||
- name: Setup env | ||
if: steps.changes.outputs.ts == 'true' | ||
uses: HatsuneMiku3939/direnv-action@v1 | ||
|
||
- name: Run tests | ||
if: steps.changes.outputs.ts == 'true' | ||
run: SUB_TESTS=ts make test | ||
|
||
- name: Publish npm package | ||
if: steps.changes.outputs.ts == 'true' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.AUTH_GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: make release-ts | ||
|
||
- name: Upload Test Coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: ./ts/coverage | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Cache node modules | ||
if: steps.deps-cache.outputs.cache-hit != 'true' && steps.changes.outputs.ts == 'true' | ||
uses: martijnhols/actions-cache/save@v3 | ||
with: | ||
path: ts/node_modules | ||
key: ${{ runner.os }}-build-ts-deps-cache-${{ hashFiles('ts/package-lock.json') }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
ignore: | ||
- "**/*.pb.go" | ||
- "**/*.pb.gw.go" | ||
- "**/mocks/.*" | ||
- "pkg" | ||
comment: false | ||
codecov: | ||
require_ci_to_pass: true | ||
parsers: | ||
gcov: | ||
branch_detection: | ||
loop: yes | ||
macro: no | ||
method: no | ||
conditional: yes | ||
coverage: | ||
range: 40..100 | ||
round: down | ||
precision: 2 | ||
status: | ||
project: | ||
default: | ||
if_not_found: success | ||
if_ci_failed: error |
Oops, something went wrong.