chore: Add tests to CI (#1984)

This commit is contained in:
CokaKoala
2023-08-30 09:54:34 -04:00
committed by GitHub
parent b15f66c2d9
commit 54f4ecedab
3 changed files with 44 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pnpm install run: pnpm install
- name: Run svelte-check - name: Run svelte-check
run: pnpm ci:check run: pnpm ci:check
env: env:
@@ -73,3 +73,33 @@ jobs:
- name: Run prettier and eslint - name: Run prettier and eslint
run: pnpm ci:lint run: pnpm ci:lint
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
# PNPM Store cache setup
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
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
- name: Run tests
run: pnpm run test

View File

@@ -4,7 +4,7 @@
"description": "monorepo for @skeletonlabs/skeleton", "description": "monorepo for @skeletonlabs/skeleton",
"private": true, "private": true,
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "pnpm -F @skeletonlabs/skeleton test",
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
"getall": "node scripts/checkout.cjs && pnpm i", "getall": "node scripts/checkout.cjs && pnpm i",
"postinstall": "pnpm -r sync", "postinstall": "pnpm -r sync",

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover" data-theme="skeleton">
<div style="display: contents" class="h-full overflow-hidden">%sveltekit.body%</div>
</body>
</html>