Skip to content

Commit

Permalink
feat: publish
Browse files Browse the repository at this point in the history
* build: automatically publish to NPM if tag is created

* build: cz config

* bump: version 0.0.1a0 → 0.0.1a1
  • Loading branch information
AlanVerbner authored Sep 28, 2023
1 parent f14675a commit 1470388
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .cz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "$version"
version_provider = "npm2"
version = "0.0.1a1"
update_changelog_on_bump = true
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Node.js Package

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm test
- run: npm run build
- name: Check version
run: |
# Extract the tag version from the GITHUB_REF environment variable, removing the 'refs/tags/' prefix
TAG_VERSION=${GITHUB_REF#refs/tags/}
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
echo "Tag version ($TAG_VERSION) does not match package.json version ($PACKAGE_VERSION)"
exit 1
fi
- run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## 0.0.1a1 (2023-09-27)

### Feat

- gate sizing implementation
- add to-emit-event matcher
- add balance matchers
- add balance matchers
- support mina transactions in toFail matchers
- add toFail matcher
- added matchers for signatures
- added commands history to be stored in $HOME directory
- improved user interaction with the REPL to provide better feedback and guidance
- cli feature initial commit. Basic CLI support is provided.
- added test to check boolean type
- initial base commit

### Fix

- added missing jest devDependency

### Refactor

- improved matchers with more natural patterns and checks
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Mina Testing Utils

⚠️ This todo is incomplete and not ready for use ⚠ ️

This repository contains a set of utilities for testing Mina zkapps:

- Custom jest matchers
Expand All @@ -18,16 +16,16 @@ This repository contains a set of utilities for testing Mina zkapps:
In order to use this tool, you should install it as a dev dependency on your existing project, for example, one created using `zkcli-app`:

```bash
npm --save-dev install mina-jest-matchers #TODO
npm --save-dev install @atixlabs/mina-testing-utils
```

## Using Jest matchers

Import it in your tests as follows:

```typescript
// Impor to extend the matchers
import 'mina-jest-matchers';
// Import to extend the matchers
import '@atixlabs/mina-testing-utils';

describe('my test', () => {

Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mina-testing-utils",
"version": "0.0.1",
"name": "@atixlabs/mina-testing-utils",
"version": "0.0.1a1",
"description": "Handful MINA testing utilx to be used alongside with zkapp-cli generated projects",
"main": "lib/index.js",
"types": "lib/types.ts",
Expand All @@ -12,9 +12,11 @@
"build": "rimraf ./dist && npm run build:lib && npm run build:cli && cp package* ./dist/",
"build:lib": "tsc -p ./tsconfig.lib.json && cp lib/types.ts ./dist/lib/",
"build:cli": "cp -r ./cli ./dist/",
"dev-pack": "npm run build && npm pack ./dist/"
"dev-pack": "npm run build && npm pack ./dist/",
"release:alpha": "git cz bump --prerelease alpha --changelog",
"release": "git cz bump --changelog"
},
"author": "Globant",
"author": "Atixlabs",
"license": "MIT",
"devDependencies": {
"@jest/globals": "29.6.2",
Expand Down

0 comments on commit 1470388

Please sign in to comment.