Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.
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
10 changes: 10 additions & 0 deletions .github/sdk-update-issue-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: fix code after sdk-js upgrade
labels: bug
---

_Note: This issue was **automatically created** because the CI pipeline broke after an update in the SDK on {{ date | date('YYYY-MM-D')}}._

Please **fix the code inside this repository** for which the CI broke after pushing [{{ env.SHA }}]({{ env.URL }}) on the develop branch of the SDK.
**You do not have to fix something in the SDK!**
This issue just displays a breaking change was made to the SDK.
6 changes: 0 additions & 6 deletions .github/workflows/kube-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: set sdk dependency to 'latest' & set up .npmrc to connect to github packages
run: |
echo $(jq '.dependencies."@kiltprotocol/sdk-js"="latest"' package.json) > package.json
mv -f .npmrc.github .npmrc

- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
Expand All @@ -47,7 +42,6 @@ jobs:
docker build \
-t $ECR_REGISTRY/$ECR_REPOSITORY:$ECR_IMAGE_TAG \
-t $ECR_REGISTRY/$ECR_REPOSITORY:$SHA_IMAGE_TAG \
--build-arg NODE_AUTH_TOKEN=${{ secrets.GITHUB_TOKEN }} \
.
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$ECR_IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$SHA_IMAGE_TAG
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/test-sdk-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test SDK Update

on:
repository_dispatch:
types: [sdk-update]

jobs:
integration_test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Use Node.js 10
uses: actions/setup-node@v1
with:
node-version: 10

- name: Upgrade sdk to latest dev version
run: yarn upgrade @kiltprotocol/sdk-js@dev

- name: Test demo-client
run: |
yarn lint
yarn build
yarn test
yarn test:e2e --forceExit

- name: Create issue on failure
if: ${{ failure() }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
title: fix code after sdk-js upgrade
labels: bug
assignees: ${{ github.event.client_payload.github.sender.login }}
SHA: ${{ github.event.client_payload.github.sha }}
URL: https://github.com/KILTprotocol/sdk-js/commit/${{ github.event.client_payload.github.sha }}
with:
filename: .github/sdk-update-issue-template.md
14 changes: 2 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,12 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://npm.pkg.github.com
scope: '@kiltprotocol'
- name: yarn install, lint, test and build
run: |
yarn upgrade --scope @kiltprotocol --latest
yarn install
yarn lint
yarn test
yarn build
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

integration-tests:

Expand All @@ -50,12 +45,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 10
registry-url: https://npm.pkg.github.com
scope: '@kiltprotocol'
- name: yarn install, lint, test and build
run: |
yarn upgrade --scope @kiltprotocol --latest
yarn install
yarn test:e2e --forceExit
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

3 changes: 0 additions & 3 deletions .npmrc.github

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@godaddy/terminus": "^4.1.0",
"@kiltprotocol/sdk-js": "^0.19.1-affad9d.0",
"@kiltprotocol/sdk-js": "^0.19.1-8",
"@nestjs/common": "^5.4.0",
"@nestjs/core": "^5.4.0",
"@nestjs/mongoose": "^5.2.2",
Expand All @@ -41,8 +41,8 @@
"@types/mongoose": "^5.3.1",
"@types/node": "^10.7.1",
"@types/supertest": "^2.0.5",
"mongodb-memory-server": "^6.6.3",
"jest": "26.4.2",
"mongodb-memory-server": "^6.6.3",
"nodemon": "^1.18.3",
"prettier": "^1.14.2",
"supertest": "^3.1.0",
Expand Down
11 changes: 6 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@

"@kiltprotocol/portablegabi@^0.4.0":
version "0.4.0"
resolved "https://npm.pkg.github.com/download/@kiltprotocol/portablegabi/0.4.0/c21e5a1a3706c483b98524cc0020643b6196ce75d28365d66df4e49f3a6eac4d#b6a337834c1d832c24443bb29bc9df09f72bb5f7"
resolved "https://registry.yarnpkg.com/@kiltprotocol/portablegabi/-/portablegabi-0.4.0.tgz#b6a337834c1d832c24443bb29bc9df09f72bb5f7"
integrity sha512-fyxBnLrPpyCGmfBBlzKjhT/X9IQjpmoCmMOQmk/DnUlWa8Areo2SiGhCP1G/DPxUK6fsZOlPk2X6xrtR1FJ6ow==
dependencies:
"@polkadot/api" "^2.0.1"
Expand All @@ -519,10 +519,10 @@
"@polkadot/util" "^3.5.1"
"@polkadot/util-crypto" "^3.5.1"

"@kiltprotocol/sdk-js@^0.19.1-affad9d.0":
version "0.19.1-affad9d.0"
resolved "https://npm.pkg.github.com/download/@kiltprotocol/sdk-js/0.19.1-affad9d.0/200b384ed5e5bb5d35e21b3da717463e4aa5f9ca5753bb228c1f761dc41e4fab#8d3cfcfedca9f41fd1ff9080cfed29d79af1d2a1"
integrity sha512-iyY3g1FRNSIleQPLtP9COo/6meu150Z0wTWNMVTFVi9TFRg54V3Tx+/8rc7FI0Qyd0/uAjX8uEBUZ87SDDCIfQ==
"@kiltprotocol/sdk-js@^0.19.1-8":
version "0.19.1-8"
resolved "https://registry.yarnpkg.com/@kiltprotocol/sdk-js/-/sdk-js-0.19.1-8.tgz#7842283d79e587f3d9d48558093c796c83eabb97"
integrity sha512-EL8pWG3dgZByedxwPnEGnE//ENw7xaiJasq2x3Qust5qz59PBGUMvUnt4UPa8tBSJ/UTFG9BLXu2twtHoagFzQ==
dependencies:
"@kiltprotocol/portablegabi" "^0.4.0"
"@polkadot/api" "^2.0.1"
Expand All @@ -533,6 +533,7 @@
"@polkadot/util-crypto" "^3.5.1"
ajv "^6.12.5"
bn.js "^5.1.3"
tweetnacl "^1.0.3"
typescript-logging "^0.6.4"
uuid "^8.1.0"

Expand Down