chore: ignore pnpm-lock recursively during linting #246
Workflow file for this run
This file contains 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: CI | |
on: [push, pull_request] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
# Checkout | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# The whole Node.js and pnpm installation and caching | |
# Based on https://github.com/pnpm/action-setup/tree/6e1964dde3397a825e79e4607ad57f3f7ca2c7cb#use-cache-to-reduce-installation-time | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "pnpm_cache_dir=$(pnpm store path)" >> ${GITHUB_OUTPUT} | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: SvelteKit Sync | |
run: pnpm exec svelte-kit sync | |
- name: Lint | |
run: npm run lint | |
- name: Svelte Sync | |
if: success() || failure() # Run even if previous failed | |
run: npx svelte-kit sync | |
- name: Svelte Check | |
if: success() || failure() # Run even if previous failed | |
run: npm run check | |
# Build Frontend | |
- name: Build Frontend | |
if: success() || failure() # Run even if previous failed | |
run: npm run build | |
# Cache Playwright | |
- name: Cache Playwright | |
if: success() || failure() # Run even if previous failed | |
uses: actions/cache@v3 | |
id: playwright_cache | |
with: | |
path: ~/.cache/ms-playwright | |
key: ${{ runner.os }} # (not a good key) | |
# Install Playwright | |
- name: Install Playwright | |
# if: steps.cache.outputs.cache-hit != 'true' | |
run: npx playwright install --with-deps | |
# Run Tests | |
- name: Test | |
run: npm run test | |
env: | |
DEBUG: pw:webserver | |
# Upload test results | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: test-results |