Skip to content

Commit

Permalink
Update for 1.0 (#300)
Browse files Browse the repository at this point in the history
* Reverted back fee changes (#53)

* Reversed the fix fee tests #57

* Fix fee e2e test

* Refine circleci config

* Update dependency (#69)

* Update dependency from plugnet to polkadot

* Update extrinsic v2 (#70)

* Added extrinsic v2 support (CENNZnet develop branch)

* Ensure all tests in generic asset are ok to go with rc1 node (#73)

* Set up private testnet with circleci integration test

* Bump handlebars from 4.1.2 to 4.5.3

* Revert babel config to get build work

* Update CENNZnet image version to 1.0.0-rc1 (#80)

Update Index/nonce type to u64
Replace tip with ChargeTransactionPayment struct

* Add release notes for 1.0.0-alpha

* Add development guideline

* Fee payment (#85)

* Add support for multi-currency fee payment

* Upgrade to polkadot v1.1.1 (#86)

* Compatibility with CENNZnet 1.0.0-rc2
* Test for querying extrinsic fee

* Update read me, dependency and some clean up

* Support CENNZnet node's develop branch (#89)

* Support CENNZnet node's develop branch

* Added sha hash of latest CENNZnet develop branch image in docker-compose

* Added code & test for rpc call to get price queries (#90)

* Added code & test for rpc call to get price queries

* Remove deprecated method from crml-cennzx-spot repo (#91)

* Added derived query and test case to get estimated fee

* as per review comments

* as per review comment

* as per review comment

* wip to fix issue of adding construction in types

* as per code review comment

* Added some scenario for estimate fee interface

* Get api.js work with latest cennznet (#94)

* Fix cennznet docker image version (#96)

* chore(deps): bump acorn from 5.7.3 to 5.7.4 (#92)

Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](acornjs/acorn@5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Updated sdk to work with latest image CENNZnet 1.0.0 (#98)

* Updated sdk to work with latest image CENNZnet 1.0.0

* Release 1.0.0 (cennznet/cennznet:latest) (#95)

* Added changes to enable the skipped test from API

* wip

* added console logs to check on docker, works on local

* Added changes for both genesis hash

* as per review comment

* remove console logs

* Updated static meta to use latest cennznet genesis hash

* removed unused import

* Fix generate docs (#100)

* Fix generate docs

* fix decoding of pkb response (#104)

* Add Message and MessageId types for Sylo

* Release 1.0.1 (cennznet/cennznet:1.0.0)

Docker digest: sha256:c33d37c52a6b980ef7e93efbee7383a413616077ecfee9b7e9585d8f834793cd

* add null constructor to sylo runtime response enum (#109)

* Release 1.0.2 (cennznet/cennznet@sha256:c33d37c52a6b980ef7e93efbee7383a413616077ecfee9b7e9585d8f834793cd) (#110)

* Updated static metadata (#112)

* Updated static metadata

* Updated/added test cases and a script to auto generate staticMetadata

* chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 (#113)

Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](faye/websocket-extensions-node@0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Api compatible with node (#115)

* Fixed few tests and added additional type for GA

* updated docker image to using rc1 image

* Updated github link of the branch docker image is pointing to

* commented the github cennznet node branch link

* Feat/support on chain asset registry (#116)

* Changes to support on-chain asset-registry via SDK

* Added support for liquidity RPC calls (#117)

* Added support for liquidity RPC calls

* Update and Fix examples and correct example names

Some examples would be still failing but we will have separate tickets for them

* Chore/generate slim data (#120)

* script to generate slim meta data

* Release 1.0.3 (cennznet/cennznet:1.1.0-rc1) (#118)

* Update get_started doc

* Add FAQ

* Mention polkadot keyring instead of our own wallet.

Also explain CENNZ, Alice and BOB consts.

* Label the link

* create not connect

* A minor sentence correction

* Updated azalea metadata

(cherry picked from commit a82b211)

* Updated slim metadata in a test case

(cherry picked from commit 68aae9e)

* Update README (#124)

Move release notes to changelogs
Correct author field

* chore(deps): bump lodash from 4.17.15 to 4.17.19 (#125)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Tidy up tx.e2e.tests (#127)

Add genericAsset.updateAssetInfo test

* change -> chain

* Doughnut extrinsic support (#126)

* Add doughnut + CENNZnut e2e tests
* Fix TS SignerOptions to include doughnut

Co-authored-by: karishma <[email protected]>
Co-authored-by: Jordan <[email protected]>

* Add initialization to extrinsic phase (#130)

* Release/1.1.0 (#136)

* Release 1.1.0 (cennznet/cennznet:develop-993900)

* chore(deps): bump elliptic from 6.5.2 to 6.5.3 (#137)

Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](indutny/elliptic@v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add @plugnet/doughnut-wasm to deps (#139)

* It should be in types deps, not devDeps

* Release 1.1.1 (cennznet/cennznet:develop-993900) (#140)

* testing new mac

* Made doughnut wasm packages as optional dependencies and used try/cat… (#142)

* Made doughnut wasm packages as optional dependencies and added conditional compile support for doughnuts

* Release 1.1.2 (cennznet/cennznet:develop-993900) (#144)

* chore(deps): bump prismjs from 1.19.0 to 1.21.0 (#143)

Bumps [prismjs](https://github.com/PrismJS/prism) from 1.19.0 to 1.21.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](PrismJS/prism@v1.19.0...v1.21.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add derived query for staking accounts (#145)

* Added customise staking query

* Fix withdraw reasons decoding (#146)

* no coupling between session and account info query for staking (#147)

* no coupling between session and account info query for staking

* Add staking e2e tests (#141)

* Remove rewards type definitions
* Add staking type definitions
* Implement e2e test for user & governance staking methods

* Support underscore in number with babel plugin (#152)

* Support underscore in number with babel plugin

Co-authored-by: Jordan Beauchamp <[email protected]>

* Release 1.2.0 (cennznet/cennznet:develop-993900) (#151)

* Fix API connection by moving types in a different file (#154)

* Fix API connection issue by moving types in a different file

* Release 1.2.1 (cennznet/cennznet:develop-993900) (#156)

* Converted tslint file to eslint and extended eslintrc with recommended typescript-eslint, eslint recommended checks and recommended-requiring-type-checking rules (#159)

* chore(deps): bump http-proxy from 1.18.0 to 1.18.1 (#169)

Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](http-party/node-http-proxy@1.18.0...1.18.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Replace wallet with polkadot/keyring (#171)

* Replace wallet with polkadot/keyring

* Specify the type: 'sr25519' for test keyrings

* Restore the resolution for the example project

* Support nodes develop branch (#172)

* Support nodes develop branch

* Updated prettierrc to use bracketSpacing as true to support a space after curly brace (#173)

* Use @cennznet/types uniformly wherever possible (#177)

* Use @cennznet/types uniformly wherever possible

* updated test (#178)

Co-authored-by: KarishmaBothara <[email protected]>

* Add the publish CircleCi job for the release branches (#175)

Add the publish CircleCi job for the release branches

* Fix yarn lint command (#181)

* Chore/consistency (#179)

Made change to make the repo more consistent

* Fixed forceUnbond test race condition (#182)

* Make attestation derive only (#180)

* Make attestation derive only, remove crml-generic-asset and crml-attestion packages

* updated attestation rx test

Co-authored-by: karishma <[email protected]>

* Changes to move the cennzx derived queries to api derives and refine t… (#183)

* Make cennzx derive only

* Chore/update readme with resolutions (#184)

* Update APIs readme as well as resolutions from example to include jsonrpc and rpc-provider
* Updated readme in the doc examples

* Initial branch with api-types replaced in types (#186)

* Upgraded with latest polkadot version (^2.3.1)

Co-authored-by: Alex Sed <[email protected]>

* Maintain the behaviour of ApiRx connection establishment strictly as it used to be (#197)

* updated docker compose (#199)

* Fixed all tests as per latest develop branch commit (develop-e8f05b)

* 1.3.0 alpha.1 (#200)

* Updated package version and changelog

* updated depencies

* update versions (#201)

* added login step in circle ci config (#202)

* Updated package version and changelog (#204)

Deprecated last version 1.3.0-alpha.1 and bump to version 1.3.0-alpha.2

* Updated API to support 1.2.0-rc1-node (#208)

* Updated API to support 1.2.0-rc1-node

* support decoding of old block and current block on V37 chain (#209)

* support decoding of old block and current block on V37 chain

* Fix sylo types (#211)

* Fix sylo types

* update node version (#213)

* Updated documentation in this repo (#212)

* Updated documentation in this repo

* chore(deps-dev): bump semantic-release from 15.14.0 to 17.2.3 (#210)

Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.14.0 to 17.2.3.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](semantic-release/semantic-release@v15.14.0...v17.2.3)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* 1.3.0 (#215)

* Release 1.3.0

Signed-off-by: KarishmaBothara <[email protected]>

* RPC definitions at one place (#217)

* chore(deps): bump highlight.js from 9.18.1 to 9.18.5 (#219)

Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.18.1 to 9.18.5.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/9.18.5/CHANGES.md)
- [Commits](highlightjs/highlight.js@9.18.1...9.18.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fixed fee asset example while sending extrinsic (#220)

* Fixed fee asset example while sending extrinsic

* Generating types from API repo (#222)

* Generate @cennznet/types from metadata
* disconnect the finality node open in test

* Fix event decoding with rv 36 (#223)

* Fix event decoding with rv 36

* update dependencies (#233)

* Update rxjs -> util
Update all @PolkaDot dependencies
Remove semantic-release/czchangelog as unused

* generate and update types after rebase

* subscribe for only next 3 events - to prevent test from timeout

* dont patch phase for rv36

* as per review comment

Co-authored-by: Jordan Beauchamp <[email protected]>

* Add a minimal test suite for v36 backwards compatibility (#236)

* Add a minimal test suite for v36 backwards compatibility


Co-authored-by: KarishmaBothara <[email protected]>

* Release/1.3.1 (#238)

* Releasing the 1.3.1 version

* as per review comment

* publish release branch

* [ci skip] undo ci changes

Co-authored-by: Jordan Beauchamp <[email protected]>

* Chore/gh actions (#218)

* Use GH actions

* Fix typescript errors 4.1.*

* On push to develop also

* Fix dependencies in API project (#239)

* add ci badge to readme (#240)

* Trying to fix issue - #241 (#242)

* Making sure util is not used anywhere before releasing new version (#245)

* Pre release branch for CENNZnet API to release 1.3.2 version. (#246)

* Prerelease/1.3.2 (#247)

* Prerelease/1.3.2 (#248)

* Prerelease/1.3.2 (#250)

* Added test for decode/encode response format and added doc example for rx subscribe pinned at version polkadot/rpc-provider 2.7.1 (#251)

* Added test for decode/encode response format and added doc example for rx subscribe pinned at version polkadot/rpc-provider 2.7.1

* chore(deps): bump ini from 1.3.5 to 1.3.7 (#252)

Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](npm/ini@v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* API compatible with latest develop branch (#259)

* API compatible with latest develop branch

Signed-off-by: KarishmaBothara <[email protected]>

* address review comments

* Pre release 1.3.3-alpha.1 (cennznet/cennznet:develop-4ff509) (#260)

* Prerelease/1.3.3 alpha.1 (#261)

* prerelease 1.3.3-alpha.1 signed commit (#262)

* Prerelease version 1.3.3 (#263)

* Prevent trigger for github publish pipeline unless automerge label is applied (#267)

* chore(deps): bump prismjs from 1.22.0 to 1.23.0 (#265)

Bumps [prismjs](https://github.com/PrismJS/prism) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](PrismJS/prism@v1.22.0...v1.23.0)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump elliptic from 6.5.3 to 6.5.4 (#266)

Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](indutny/elliptic@v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Added extrinsicPayload in registry (#258)

* Added extrinsicPayload in registry and test case for signing extrinsic via signer

* Pre release branch for CENNZnet API to release 1.3.4 version (#268)

* Re-generated docs from latest metadata (#270)

* Chore/update slim meta script (#271)

* optimise slim data with asCallsOnly logic from MetadataVerisoned

* clean up

* Copied staking derived queries from UI project (#272)

* Copied staking derived queries from UI project

* chore(deps): bump y18n from 4.0.0 to 4.0.1 (#274)

* chore(deps): bump y18n from 4.0.0 to 4.0.1

Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: KarishmaBothara <[email protected]>

* Batch transfer example (#275)

* explain in example how to use batch utility

* Add NFT initial types/interfaces (#276)

* Add type definitions for NFT module

* restore grandpa extra rpc

* augment our types

* Remove unused staking derive query

* Prep 1.3.5-alpha.0 release (#280)

* Refactor v36 compatibility tests (#283)

* Refactor v36 compatability tests

* chore(deps): bump ssri from 6.0.1 to 6.0.2 (#282)

Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](npm/ssri@v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update readme (#284)

Remove unused scripts
CENNZX trade e2e test isFinalized -> isInBlock
Fix babel warning

* Update NFT metadata (#285)

* Update NFT metadata and add some e2e tests
* Fix decimal places in registeredAssets test

* Backport NFT meta/type updates from 2.0.0

* split 1.0 & 2.0 release pipeline

* rename stable to master

* stable -> master

* Update release instructions in readme

* update if guard in GH actions

Co-authored-by: karishma <[email protected]>
Co-authored-by: Ben Gao <[email protected]>
Co-authored-by: alex zhen wang <[email protected]>
Co-authored-by: Ben Gao <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JCSanPedro <[email protected]>
Co-authored-by: Eric <[email protected]>
Co-authored-by: AlexSedNZ <[email protected]>
  • Loading branch information
9 people authored May 10, 2021
1 parent 959476d commit 8f0c00f
Show file tree
Hide file tree
Showing 343 changed files with 24,064 additions and 18,306 deletions.
33 changes: 0 additions & 33 deletions .circleci/config.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/build/**
/api_docs/**
**/node_modules/**
**/*.e2e.ts
**/*.spec.*
/scripts/*
packages/**/build/**
85 changes: 85 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config
It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.
We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
Happy linting! 💖
*/
module.exports = {
"env": {
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
'import',
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"rules": {
// rules turned off in upstream project (also required when recommended-requiring-type-checking is extended)
'@typescript-eslint/explicit-function-return-type': "off",
'@typescript-eslint/no-unsafe-assignment': "off",
'@typescript-eslint/no-unsafe-call': "off",
'@typescript-eslint/no-unsafe-member-access': "off",
'@typescript-eslint/no-unsafe-return': "off",
'@typescript-eslint/no-unnecessary-type-assertion': "off",
'@typescript-eslint/restrict-plus-operands': "off",
'@typescript-eslint/restrict-template-expressions': "off",
// Support recommended-requiring-type-checking (specific to this project) set them as warning
'@typescript-eslint/unbound-method': "warn",
'@typescript-eslint/no-floating-promises': "warn",
// Making affected recommended types as warning for now
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-inferrable-types": "warn",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
// "@typescript-eslint/member-ordering": "error",
// "@typescript-eslint/naming-convention": "error",
// "@typescript-eslint/no-param-reassign": "error",
"@typescript-eslint/promise-function-async": "error",
// "arrow-body-style": "error",
"complexity": "error",
"curly": [
"error",
"multi-line"
],
"default-case": "error",
"eqeqeq": [
"error",
"always"
],
"import/no-extraneous-dependencies": "off",
"import/order": "error",
"import/no-duplicates": ["error", {"considerQueryString": true}],
// "no-magic-numbers": "error",
"no-return-await": "error",
"no-undef-init": "error",
"prefer-template": "error",
"use-isnan": "error"
}
};
11 changes: 11 additions & 0 deletions .github/templates/polkadot-breaking-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "@polkadot/* breaking change(s): {{ date | date('dddd, MMMM Do') }}"
labels: upstream-break💔
---
A `@polkadot` package has updated in the valid semver range with a breaking change.
This will cause newly created `@cennznet/api` projects to break on install.

**details:**
```javascript
{{ env.ISSUE_DETAILS }}
```
99 changes: 99 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: PR builder

on:
pull_request:
branches:
- develop
push:
branches:
- develop

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/setup-node@v1
with:
node-version: '15.3'
- name: cache node modules
id: cache
uses: actions/cache@v2
with:
path: node_modules
key: node-modules-${{ hashFiles('yarn.lock') }}
- name: install
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: lint
run: yarn lint
- name: build
run: yarn build
- name: unit tests
run: yarn test --coverage
e2e:
needs: ci
runs-on: ubuntu-latest
strategy:
matrix:
test-suite:
# grouped test runs
- "v36-compat"
- "create|call|queries"
- tx
- attestation.*
- cennzx.*
- nft.*
- staking
- rpc.decodeResponse
- send
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '10.19'
- name: cache node modules
id: cache
uses: actions/cache@v2
with:
path: node_modules
key: node-modules-${{ hashFiles('yarn.lock') }}
- name: install
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: start v36 test node
if: contains(${{ matrix['test-suite'] }}, 'v36')
run: |
docker run --network=host -d cennznet/cennznet:1.1.1 --dev --ws-external --ws-port=9945 --no-mdns
- name: start latest test node
run: |
docker run --network=host -d cennznet/cennznet:latest --dev --tmp --ws-external --rpc-external --no-mdns
- name: test
env:
TEST_TYPE: integration
# arbitrary value to disable internal API logging in test output
NODE_ENV: disable-logging
run: |
npx jest -c jest/integration.config.js "${{ matrix['test-suite'] }}" --bail --forceExit --detectOpenHandles --runInBand
subscribe:
needs: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '15.3'
- name: start latest test node
run: |
docker run --network=host -d cennznet/cennznet:latest --dev --tmp --ws-external --rpc-external --no-mdns
- name: run subscriber script at polkadot/rpc-provider version (2.7.1)
working-directory: ./test
run: |
yarn
yarn start
65 changes: 65 additions & 0 deletions .github/workflows/publish-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release Pipeline (master/1.0)

on:
pull_request:
branches:
# stable/1.0
- master
types:
- labeled
check_suite:
types:
- completed

jobs:
merge-release-branch:
# only run if prechecks pass and the source branch is named 'prerelease/*'
if: ${{ startsWith(github.head_ref, 'prerelease/1') }} && ${{ github.event.label.name == 'automerge' }}
runs-on: ubuntu-latest
steps:
- name: Automerge
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_LABELS: automerge
MERGE_METHOD: squash
release-to-github:
needs:
- merge-release-branch
# release to github only when its a prerelease branch and auto merge label is triggered
if: ${{ startsWith(github.head_ref, 'prerelease/1') }} && ${{ github.event.label.name == 'automerge' }}
runs-on: ubuntu-latest
steps:
# checkout merged branch
- uses: actions/checkout@v2
with:
ref: master
- uses: actions/setup-node@v1
with:
node-version: '15.3'
- name: find release version
id: find_version
run: |
echo ::set-output name=tag_name::$(cat packages/api/package.json \
| grep version \
| head -1 \
| grep -E -o '[0-9|.]+\-*[a-z]*\.[0-9]+|]+')
- name: make release branch
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: "release/${{steps.find_version.outputs.tag_name}}"
- name: package
run: |
yarn && yarn build
npx lerna exec -- 'cp package.json build/'
npx lerna exec -- 'cp README.md build/'
npx lerna exec -- 'cp ../../LICENSE build/'
- name: publish to npm
env:
NPM_KEY: ${{ secrets.NPM_KEY }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_KEY}" > ~/.npmrc
echo 'Publishing to npmjs.org.'
npx lerna exec -- 'cd build && npm publish --access public'
65 changes: 65 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release Pipeline (develop/2.0)

on:
pull_request:
branches:
# bleeding-edge (2.0)
- develop
types:
- labeled
check_suite:
types:
- completed

jobs:
merge-release-branch:
# only run if prechecks pass and the source branch is named 'prerelease/*'
if: ${{ startsWith(github.head_ref, 'prerelease/2') }} && ${{ github.event.label.name == 'automerge' }}
runs-on: ubuntu-latest
steps:
- name: Automerge
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_LABELS: automerge
MERGE_METHOD: squash
release-to-github:
needs:
- merge-release-branch
# release to github only when its a prerelease branch and auto merge label is triggered
if: ${{ startsWith(github.head_ref, 'prerelease/2') }} && ${{ github.event.label.name == 'automerge' }}
runs-on: ubuntu-latest
steps:
# checkout merged branch
- uses: actions/checkout@v2
with:
ref: develop
- uses: actions/setup-node@v1
with:
node-version: '15.3'
- name: find release version
id: find_version
run: |
echo ::set-output name=tag_name::$(cat packages/api/package.json \
| grep version \
| head -1 \
| grep -E -o '[0-9|.]+\-*[a-z]*\.[0-9]+|]+')
- name: make release branch
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: "release/${{steps.find_version.outputs.tag_name}}"
- name: package
run: |
yarn && yarn build
npx lerna exec -- 'cp package.json build/'
npx lerna exec -- 'cp README.md build/'
npx lerna exec -- 'cp ../../LICENSE build/'
- name: publish to npm
env:
NPM_KEY: ${{ secrets.NPM_KEY }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_KEY}" > ~/.npmrc
echo 'Publishing to npmjs.org.'
npx lerna exec -- 'cd build && npm publish --access public'
Loading

0 comments on commit 8f0c00f

Please sign in to comment.