Skip to content

Commit

Permalink
Add format check command and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Jan 22, 2024
1 parent 253f5af commit a1b8c03
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Format Check

on: [push]

env:
PUBLIC_SUPABASE_URL: 'https://fake_test_url.supabase.co'
PUBLIC_SUPABASE_ANON_KEY: 'fake_anon_key'
PRIVATE_SUPABASE_SERVICE_ROLE: 'fake_service_role'
PRIVATE_STRIPE_API_KEY: 'fake_strip_api_key'
PUBLIC_SITE_NAME: 'SaaS Starter Build Test'

jobs:
build_and_test:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: NPM install
run: npm install

- name: Check Code Format
run: npm run format_check
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
"test": "vitest",
"lint": "eslint .",
"format": "prettier --write --plugin prettier-plugin-svelte ./src"
"format": "prettier --write --plugin prettier-plugin-svelte ./src",
"format_check": "prettier --check --plugin prettier-plugin-svelte ./src"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
Expand Down

0 comments on commit a1b8c03

Please sign in to comment.