Skip to content

Commit

Permalink
Check formatting in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sockmaster27 committed Oct 27, 2024
1 parent 0c022d9 commit 46ab14a
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 44 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]
push:
branches: [master]
pull_request:
branches: [master]

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies
run: npm ci
- name: Check
run: npm run check
- name: Package
run: npm run package
- name: Build Example Site
run: npm run build
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies
run: npm ci
- name: Check
run: npm run check
- name: Package
run: npm run package
- name: Build Example Site
run: npm run build
44 changes: 22 additions & 22 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Release to npm

on:
release:
types: [created]
release:
types: [created]

jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: cd packages/svader
- name: Install Dependencies
run: npm ci
- name: Package
run: npm run package
- name: Publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: cd packages/svader
- name: Install Dependencies
run: npm ci
- name: Package
run: npm run package
- name: Publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
8 changes: 7 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "auto"
"endOfLine": "auto",
"overrides": [
{
"files": "*.yml",
"options": { "tabWidth": 2 }
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"package": "cd packages/svader && npm run package",
"dev:v4": "npm run package && cd packages/tests-svelte4 && npm run dev",
"preview:v4": "npm run package && cd packages/tests-svelte4 && npm run preview",
"check": "npm run package && npm run check:svader && npm run check:tests-svelte4",
"check": "npm run package && npm run check:formatting && npm run check:svader && npm run check:tests-svelte4",
"check:formatting": "prettier . --check",
"check:svader": "cd packages/svader && npm run check",
"check:tests-svelte4": "cd packages/tests-svelte4 && npm run check",
"build": "npm run package && npm run build:tests-svelte4",
Expand All @@ -18,6 +19,7 @@
"devDependencies": {
"@playwright/test": "^1.48.1",
"@types/node": "^22.7.9",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.7"
}
}

0 comments on commit 46ab14a

Please sign in to comment.