Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lock #300

Merged
merged 3 commits into from
Jul 20, 2023
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
15 changes: 6 additions & 9 deletions .github/workflows/node.js.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: Tests

on:
push:
workflow_call:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -34,11 +27,14 @@ jobs:
toolkit-tests:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: install
run: |
Expand All @@ -49,6 +45,7 @@ jobs:
- name: run target tests
run: |
cd testDir
npm ci
npm run build
npm run test
npm run fmt
5 changes: 3 additions & 2 deletions packages/sc-deployer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,9 @@ async function deploySC(
u64ToBytes(BigInt(contract.coins)), // scaled value to be provided here
);
}
let protos: Uint8Array = serializeProto(contract.protoPaths);
if (protos.length > 0) {

if (contract.protoPaths?.length) {
const protos = serializeProto(contract.protoPaths);
datastore.set(strToBytes(MASSA_PROTOFILE_KEY), protos);
}
});
Expand Down
2 changes: 1 addition & 1 deletion packages/sc-deployer/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface ISCData {
data: Uint8Array;
args?: Args;
coins: bigint;
protoPaths: string[];
protoPaths?: string[];
}

export interface IEventPollerResult {
Expand Down
Loading
Loading