Skip to content

Bump vite, @vitest/coverage-v8 and vitest #2091

Bump vite, @vitest/coverage-v8 and vitest

Bump vite, @vitest/coverage-v8 and vitest #2091

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
env:
NODE_VERSION: "24"
on: [push]
permissions:
# Required for OIDC token for NPM Trusted Publishers.
# See https://docs.github.com/en/actions/concepts/security/openid-connect
# and https://docs.npmjs.com/trusted-publishers.
id-token: write
contents: read
jobs:
lint:
name: ✅ Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #4.3.1
- name: Setup Node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 #v6.2.0
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
- run: npm run lint --if-present
test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #4.3.1
- name: Setup Node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 #v6.2.0
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
- run: npm test --if-present
typeCheck:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #4.3.1
- name: Setup Node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 #v6.2.0
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
- run: cd examples && npm ci
- run: npm run generateTypes
- run: npm run typeCheck --if-present
publish-dev:
if: github.ref == 'refs/heads/main'
needs: [lint, typeCheck, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #4.3.1
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 #v6.2.0
with:
node-version: ${{env.NODE_VERSION}}
- run: npm ci
- run: npm run build
- run: mkdir dev-build
- run: npm run copy-build
- name: Push to branch
uses: moodiest/push-to-branch-action@develop
env:
REPO: self
BRANCH: build
FOLDER: dev-build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-stable:
if: startsWith(github.ref, 'refs/tags/v')
needs: [lint, typeCheck, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #4.3.1
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 #v6.2.0
with:
node-version: ${{env.NODE_VERSION}}
registry-url: https://registry.npmjs.org/
package-manager-cache: false # Do not cache when publishing to prevent cache pollution attacks
- run: npm ci
- run: npm run build
- run: npm publish --provenance # Provenance required for Trusted Publishers