fix: use npm install instead of npm ci for file: dependency compat #7
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: auths-verify-widget | |
| steps: | |
| - name: Checkout widget repo | |
| uses: actions/checkout@v4 | |
| with: | |
| path: auths-verify-widget | |
| - name: Checkout auths repo (for local @auths/verifier dependency) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: auths-dev/auths | |
| path: auths | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "1.93" | |
| targets: wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: auths-verify-widget/package-lock.json | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build WASM | |
| run: npm run build:wasm | |
| - name: Type check | |
| run: npm run typecheck | |
| - name: Run tests | |
| run: npm run test | |
| - name: Build (full + slim) | |
| run: npm run build | |
| - name: Verify output exists | |
| run: | | |
| test -f dist/auths-verify.mjs || (echo "Missing dist/auths-verify.mjs" && exit 1) | |
| echo "Bundle size:" | |
| ls -lh dist/auths-verify.mjs |