Skip to content

Commit

Permalink
Merge pull request #4 from 333fred/ci
Browse files Browse the repository at this point in the history
More CI updates
  • Loading branch information
333fred authored Jul 6, 2024
2 parents e41f35b + 6a04063 commit b6ad42c
Show file tree
Hide file tree
Showing 12 changed files with 5,079 additions and 59 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto encoding=UTF-8
* text=auto eol=lf
40 changes: 40 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Format

on:
issue_comment:
types: [created]

jobs:
format:
if: github.event.issue.pull_request && contains(github.event.comment.body, '/format')
runs-on: ubuntu-latest

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Format Code
working-directory: ./ui
run: |
npm install
npx prettier --write .
# Commit changes from prettier
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Format with prettier
4 changes: 3 additions & 1 deletion .github/workflows/main-push-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -27,3 +27,5 @@ jobs:
run: |
npm install
npm run build
npx prettier --check .
15 changes: 15 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"vitest.explorer",
"esbenp.prettier-vscode",
"svelte.svelte-vscode"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [

]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"svelte.enable-ts-plugin": true
}
Loading

0 comments on commit b6ad42c

Please sign in to comment.