Skip to content

Commit

Permalink
ci: add Biome to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander committed Nov 25, 2024
1 parent cb85a38 commit 3f5fe7f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/fix-css-and-js-code-style-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Fix CSS and JS code style issues

on:
push:
pull_request:
workflow_dispatch:

jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest

- name: Fix CSS and JS code style issues
run: biome check --write .

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "ci: fix code style issues"
4 changes: 1 addition & 3 deletions .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: Fix PHP code style issues

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
Expand All @@ -27,4 +25,4 @@ jobs:
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix styling
commit_message: "ci: fix code style issues"
2 changes: 0 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: PHPStan

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: run-tests

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"lint-staged": "15.2.10"
},
"lint-staged": {
"*.{css,js,json}": "npx @biomejs/biome check --write"
"*.{css,js,json}": "biome check --write"
}
}

0 comments on commit 3f5fe7f

Please sign in to comment.