feat: support partial IDL and @entry-id annotation #430
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "[js] CI" | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled] | |
| branches: [master, master-idl-v2] | |
| paths: | |
| - "js/**" | |
| - "package.json" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Cancel previous workflow runs | |
| uses: styfle/[email protected] | |
| with: | |
| access_token: ${{ github.token }} | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: "Install: NodeJS 20.x" | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20.x | |
| - name: "Install: pnpm" | |
| uses: pnpm/action-setup@v4 | |
| - name: "Install: dependencies" | |
| run: pnpm install | |
| - name: "Run linter" | |
| run: pnpm lint | |
| test: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install wasm-opt | |
| uses: ./.github/actions/install-wasm-utils | |
| - name: Build IDL v2 Parser for WASM | |
| run: | | |
| cargo build -p sails-idl-parser-wasm --target wasm32-unknown-unknown --release | |
| wasm-opt -O4 -o ./target/wasm32-unknown-unknown/release/sails_idl_v2_parser.wasm ./target/wasm32-unknown-unknown/release/sails_idl_parser_wasm.wasm | |
| - name: "Install: NodeJS 20.x" | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20.x | |
| - name: "Install: pnpm" | |
| uses: pnpm/action-setup@v4 | |
| - name: "Install: dependencies" | |
| run: pnpm install | |
| - name: "Build" | |
| run: pnpm build | |
| - name: "Prepare: download Gear node" | |
| run: | | |
| wget -O ./gear https://github.com/gear-tech/gear/releases/download/build/gear | |
| chmod +x gear | |
| - name: "Prepare: build demo contract" | |
| run: cargo build -p demo --release | |
| - name: "Prepare: run Gear node" | |
| run: nohup ./gear --dev --execution=wasm --tmp --unsafe-rpc-external --rpc-methods Unsafe --rpc-cors all & | |
| - name: "Prepare: sleep 3 min" | |
| run: sleep 180 | |
| - name: "Test: run" | |
| run: pnpm test |