Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

feat: modernize cross-env with TypeScript, Vitest, and ESM-only build #24

feat: modernize cross-env with TypeScript, Vitest, and ESM-only build

feat: modernize cross-env with TypeScript, Vitest, and ESM-only build #24

Workflow file for this run

name: Validate
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: πŸ”¨ Build and Validate
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22, 24]
steps:
- name: πŸ“₯ Checkout
uses: actions/checkout@v4
- name: 🟒 Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: πŸ“¦ Install dependencies
run: npm ci
- name: πŸ”¨ Build
run: npm run build
- name: πŸ” Type check
run: npm run typecheck
- name: 🧹 Lint
run: npm run lint
- name: πŸ§ͺ Test
run: npm run test:run
- name: πŸ“Š Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
- name: πŸ’Ύ Cache build output
uses: actions/cache@v4
with:
path: dist
key:
build-${{ runner.os }}-${{ matrix.node-version }}-${{
hashFiles('package-lock.json') }}
restore-keys: |
build-${{ runner.os }}-${{ matrix.node-version }}-
e2e:
name: 🌐 E2E Tests
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [24]
steps:
- name: πŸ“₯ Checkout
uses: actions/checkout@v4
- name: 🟒 Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: πŸ“¦ Install dependencies
run: npm ci
- name: πŸ“‚ Restore build output
uses: actions/cache@v4
with:
path: dist
key:
build-ubuntu-latest-${{ matrix.node-version }}-${{
hashFiles('package-lock.json') }}
restore-keys: |
build-ubuntu-latest-${{ matrix.node-version }}-
- name: βœ… Verify build output exists
run: |
echo "Checking build output..."
ls -la dist/
ls -la dist/bin/
echo "Build output verified βœ…"
- name: πŸ§ͺ Run cross-env e2e tests
run: node e2e/test-cross-env.js
- name: 🐚 Run cross-env-shell e2e tests
run: node e2e/test-cross-env-shell.js