Skip to content

Commit

Permalink
support ci-data for wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
gpBlockchain committed Dec 30, 2024
1 parent 5f698cb commit c8414f0
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/ci-data-wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: ci-data-wasm

on:
push:
branches:
- master
pull_request:


jobs:
npm-install-1:
strategy:
fail-fast: false
matrix:
net: ['testnet_v1']
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Node Cache
uses: actions/cache@v2
id: npm-and-yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
~/.npm
key: ${{ runner.os }}-node_modules-${{ hashFiles('/home/runner/work/**/package-lock.json', '/home/runner/work/**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: prepare env
id: runtest
run: |
npm install --save-dev mocha @types/mocha chai @types/chai
bash prepare_wasm.sh
- name: run test
id: ci-test
run: |
npm run test-data
- name: Publish reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: jfoa-build-reports-${{ runner.os }}
path: mochawesome-report/
2 changes: 1 addition & 1 deletion ckb-light-wasm-demo
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"test": "mocha --config test/runners/mocha/.mocharc.jsonc --reporter mochawesome",
"test-load": "mocha --config test/runners/mocha/.mocharc.load.jsonc --reporter mochawesome",
"test-data": "mocha --config test/runners/mocha/.mocharc.data.jsonc --reporter mochawesome",
"test-data-wasm": "USE_LIGHT_CLIENT_WASM=true mocha mocha --config test/runners/mocha/.mocharc.data.jsonc --reporter mochawesome",
"test-cli": "mocha --config test/runners/mocha/.mocharc.cli.jsonc --reporter mochawesome",
"test-transfer-issue": "mocha --config test/runners/mocha/.mocharc.issue.jsonc --reporter mochawesome",
"test-index-panic": "mocha --config test/runners/mocha/.mocharc.index-panic.jsonc --reporter mochawesome",
Expand Down

0 comments on commit c8414f0

Please sign in to comment.