Skip to content

Commit

Permalink
Add format check command and CI (CriticalMoments#10)
Browse files Browse the repository at this point in the history
* Add format check command and CI
* Add formatting/prettier status badge
  • Loading branch information
scosman authored Jan 22, 2024
1 parent 211f7e4 commit 4af23cb
Show file tree
Hide file tree
Showing 3 changed files with 27 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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SaaS Starter

[![Build](https://github.com/CriticalMoments/CMSaasStarter/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/CriticalMoments/CMSaasStarter/actions/workflows/build.yml)
[![Format Check](https://github.com/CriticalMoments/CMSaasStarter/actions/workflows/format.yml/badge.svg?branch=main)](https://github.com/CriticalMoments/CMSaasStarter/actions/workflows/format.yml)
[![License](https://img.shields.io/badge/License-MIT-brightgreen?labelColor=32383f)](https://github.com/CriticalMoments/CMSaasStarter/blob/main/LICENSE)

### SaaS Starter is an open source, fast, and free to host SaaS template / boilerplate
Expand Down
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 4af23cb

Please sign in to comment.