fix: slim macOS app.nw and ship a universal NW.js DMG #50
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| - 'refactor/**' | |
| - 'release/**' | |
| - 'ci/**' | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| NODE_VERSION: '22' | |
| jobs: | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| # No native postinstall (nw, esbuild) needed for tsc. | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Typecheck | |
| run: npm run typecheck | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Lint | |
| run: npm run lint | |
| audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Audit (fail on high/critical) | |
| run: npm audit --audit-level=high --omit=optional | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| # Unit/UI tests are happy-dom; skip the NW.js download. | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Rebuild esbuild | |
| run: npm rebuild esbuild | |
| - name: Build | |
| run: npm run build | |
| - name: Unit / UI tests with coverage | |
| run: npm run test:unit -- --coverage | |
| env: | |
| VITE_MOCK_DEVICE: 'true' | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage | |
| path: coverage/ | |
| if-no-files-found: ignore |