Skip to content

Commit

Permalink
ci: add js-beautify javascript check
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Oct 24, 2024
1 parent 7c08758 commit 753d23c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/js-beautify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#SPDX-FileCopyrightText: 2024 Birger Schacht
#SPDX-License-Identifier: MIT

name: Run javascript linter
on:
pull_request:

jobs:
jsbeautify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# for poetry caching, we have to install poetry before setting up python
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
cache: 'poetry'
cache-dependency-path: "pyproject.toml"
python-version: "3.11"
- name: Install dev dependencies
run: |
poetry install --no-root --no-directory --only dev
- name: Run js-beautify
run: |
if find . -name "*.js" -exec poetry run js-beautify -rn {} \; | grep -v unchanged; then
exit 1;
else
exit 0;
fi

0 comments on commit 753d23c

Please sign in to comment.