name: 'test' on: workflow_call permissions: contents: read # to fetch code (actions/checkout) jobs: unit-test: runs-on: ubuntu-latest env: PUPPETEER_SKIP_DOWNLOAD: 'true' steps: - uses: actions/checkout@v6 - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: '.node-version' cache: true - name: Run unit tests run: vp run test-unit unit-test-windows: runs-on: windows-latest env: PUPPETEER_SKIP_DOWNLOAD: 'true' steps: - uses: actions/checkout@v6 - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: '.node-version' cache: true - name: Run compiler unit tests run: vp run test-unit compiler - name: Run ssr unit tests run: vp run test-unit server-renderer e2e-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Setup cache for Chromium binary uses: actions/cache@v5 with: path: ~/.cache/puppeteer key: chromium-${{ hashFiles('pnpm-lock.yaml') }} - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: '.node-version' cache: true - run: node node_modules/puppeteer/install.mjs - name: Run e2e tests run: vp run test-e2e - name: verify treeshaking run: node scripts/verify-treeshaking.js e2e-vapor: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Setup cache for Playwright browsers uses: actions/cache@v5 with: path: ~/.cache/ms-playwright key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: '.node-version' cache: true - name: Install Playwright Chromium run: vp exec playwright install chromium - name: Run e2e tests run: vp run test-e2e-vapor lint-and-test-dts: runs-on: ubuntu-latest env: PUPPETEER_SKIP_DOWNLOAD: 'true' steps: - uses: actions/checkout@v6 - name: Setup Vite+ uses: voidzero-dev/setup-vp@v1 with: node-version-file: '.node-version' cache: true - name: Run lint run: vp run lint - name: Run format check run: vp run format-check - name: Run type check run: vp run check - name: Run type declaration tests run: vp run test-dts