Add node cli for node add-on (#50) #57
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: Lint and Format | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| name: Lint | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Zig | |
| uses: openharmony-zig/setup-zig-ohos@v0.1.0 | |
| with: | |
| tag: '0.16.0' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.24.0 | |
| - name: Install workspace dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Validate prek config | |
| run: pnpm exec prek validate-config prek.toml | |
| - name: Check Zig syntax | |
| run: pnpm run check:zig | |
| - name: Build root package | |
| run: pnpm run build | |
| format: | |
| runs-on: ubuntu-latest | |
| name: Format | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Zig | |
| uses: openharmony-zig/setup-zig-ohos@v0.1.0 | |
| with: | |
| tag: '0.16.0' | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.24.0 | |
| - name: Install workspace dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Format | |
| run: pnpm run format | |
| - name: Check formatting | |
| run: git diff --exit-code |