name: ci on: pull_request: branches: - main push: branches: - main permissions: contents: read jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - uses: pnpm/setup@731dfb6463bbd11c11fd0ee11fe00ed0e36d48a1 # v3 with: runtime: node@26 cache: true install: false - name: ๐Ÿ“ฆ Install dependencies run: pnpm install - name: ๐Ÿšง Set up project run: pnpm dev:prepare - name: ๐Ÿ”  Lint project run: pnpm run lint test: strategy: matrix: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - uses: pnpm/setup@731dfb6463bbd11c11fd0ee11fe00ed0e36d48a1 # v3 with: runtime: node@26 cache: true install: false - name: ๐Ÿ“ฆ Install dependencies run: pnpm install # https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L62 # Install playwright's binary under custom directory to cache - name: Set Playwright path (non-windows) if: runner.os != 'Windows' run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV - name: Set Playwright path (windows) if: runner.os == 'Windows' run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV - name: Cache Playwright's binary uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6 with: # Playwright removes unused browsers automatically # So does not need to add playwright version to key key: ${{ runner.os }}-playwright-bin-v1 path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }} - name: Install Playwright # does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved run: pnpm playwright install chromium - name: ๐Ÿšง Set up project run: pnpm dev:prepare - name: ๐Ÿงช Test project run: pnpm test - name: ๐Ÿ’ช Test types run: pnpm test:types - name: ๐Ÿ›  Build project run: pnpm build - name: ๐ŸŸฉ Coverage if: runner.os != 'Windows' uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7