fix: adjust actions #110
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: Tests | |
| on: [push, pull_request] | |
| jobs: | |
| test-node: | |
| name: Test on Node.js (${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22, 24] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Setup Vite+ | |
| uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| cache: true | |
| - name: Run tests | |
| run: vp test | |
| smoke-bun: | |
| name: Smoke on Bun | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: 24 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@f4d14e019c4ef7fdb8623d7331f741f6a4b0f0a0 # v1 | |
| - name: Setup Vite+ | |
| uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| cache: true | |
| - name: Build package | |
| run: vp run build | |
| - name: Smoke test ESM bundle in Bun | |
| run: bun -e "const mod = await import('./dist/brazilian-utils.js'); if (!('isValidCpf' in mod)) throw new Error('Missing isValidCpf export');" | |
| smoke-deno: | |
| name: Smoke on Deno | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: 24 | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@e95548e13f374b46915956c2ecce7598176f265d # v2.0.3 | |
| with: | |
| deno-version: v2.x | |
| - name: Setup Vite+ | |
| uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| cache: true | |
| - name: Build package | |
| run: vp run build | |
| - name: Smoke test ESM bundle in Deno | |
| run: deno eval --allow-read "const mod = await import('./dist/brazilian-utils.js'); if (!('isValidCpf' in mod)) throw new Error('Missing isValidCpf export');" | |
| test-browsers: | |
| name: Test on Browsers (${{ matrix.browser }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| browser: [edge, chrome, firefox] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Vite+ | |
| uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| cache: true | |
| - name: Run tests in ${{ matrix.browser }} | |
| run: vp test --browser=${{ matrix.browser }} | |
| test-safari: | |
| name: Test on Browsers (safari) | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Vite+ | |
| uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| cache: true | |
| - name: Run tests in Safari | |
| run: vp test --browser=safari --browser.headless=false |