mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 07:29:59 -07:00
Add web frontend linter to CI
This commit is contained in:
committed by
Will Greenberg
parent
e5c0e13d32
commit
27408dd64a
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
@@ -24,6 +24,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
code_changed: ${{ steps.files_changed.outputs.code_count }}
|
code_changed: ${{ steps.files_changed.outputs.code_count }}
|
||||||
daemon_changed: ${{ steps.files_changed.outputs.daemon_count }}
|
daemon_changed: ${{ steps.files_changed.outputs.daemon_count }}
|
||||||
|
web_changed: ${{ steps.files_changed.outputs.web_count }}
|
||||||
docs_changed: ${{ steps.files_changed.outputs.docs_count }}
|
docs_changed: ${{ steps.files_changed.outputs.docs_count }}
|
||||||
installer_changed: ${{ steps.files_changed.outputs.installer_count }}
|
installer_changed: ${{ steps.files_changed.outputs.installer_count }}
|
||||||
rootshell_changed: ${{ steps.files_changed.outputs.rootshell_count }}
|
rootshell_changed: ${{ steps.files_changed.outputs.rootshell_count }}
|
||||||
@@ -42,12 +43,14 @@ jobs:
|
|||||||
echo "building everything"
|
echo "building everything"
|
||||||
echo code_count=forced >> "$GITHUB_OUTPUT"
|
echo code_count=forced >> "$GITHUB_OUTPUT"
|
||||||
echo daemon_count=forced >> "$GITHUB_OUTPUT"
|
echo daemon_count=forced >> "$GITHUB_OUTPUT"
|
||||||
|
echo web_count=forced >> "$GITHUB_OUTPUT"
|
||||||
echo docs_count=forced >> "$GITHUB_OUTPUT"
|
echo docs_count=forced >> "$GITHUB_OUTPUT"
|
||||||
echo installer_count=forced >> "$GITHUB_OUTPUT"
|
echo installer_count=forced >> "$GITHUB_OUTPUT"
|
||||||
echo rootshell_count=forced >> "$GITHUB_OUTPUT"
|
echo rootshell_count=forced >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "code_count=$(git diff --name-only $lcommit...HEAD | grep -e ^bin -e ^installer -e ^lib -e ^rootshell -e ^telcom-parser | wc -l)" >> "$GITHUB_OUTPUT"
|
echo "code_count=$(git diff --name-only $lcommit...HEAD | grep -e ^bin -e ^installer -e ^lib -e ^rootshell -e ^telcom-parser | wc -l)" >> "$GITHUB_OUTPUT"
|
||||||
echo "daemon_count=$(git diff --name-only $lcommit...HEAD | grep -e ^bin -e ^lib -e ^telcom-parser | wc -l)" >> "$GITHUB_OUTPUT"
|
echo "daemon_count=$(git diff --name-only $lcommit...HEAD | grep -e ^bin -e ^lib -e ^telcom-parser | wc -l)" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "web_count=$(git diff --name-only $lcommit...HEAD | grep -e ^bin/web | wc -l)" >> "$GITHUB_OUTPUT"
|
||||||
echo "docs_count=$(git diff --name-only $lcommit...HEAD | grep -e ^book.toml -e ^doc | wc -l)" >> "$GITHUB_OUTPUT"
|
echo "docs_count=$(git diff --name-only $lcommit...HEAD | grep -e ^book.toml -e ^doc | wc -l)" >> "$GITHUB_OUTPUT"
|
||||||
echo "installer_count=$(git diff --name-only $lcommit...HEAD | grep -e ^installer | wc -l)" >> "$GITHUB_OUTPUT"
|
echo "installer_count=$(git diff --name-only $lcommit...HEAD | grep -e ^installer | wc -l)" >> "$GITHUB_OUTPUT"
|
||||||
echo "rootshell_count=$(git diff --name-only $lcommit...HEAD | grep -e ^rootshell | wc -l)" >> "$GITHUB_OUTPUT"
|
echo "rootshell_count=$(git diff --name-only $lcommit...HEAD | grep -e ^rootshell | wc -l)" >> "$GITHUB_OUTPUT"
|
||||||
@@ -126,6 +129,22 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
NO_FIRMWARE_BIN=true cargo clippy --verbose --no-default-features --features=${{ matrix.device.name }}
|
NO_FIRMWARE_BIN=true cargo clippy --verbose --no-default-features --features=${{ matrix.device.name }}
|
||||||
|
|
||||||
|
test_web_frontend:
|
||||||
|
needs: files_changed
|
||||||
|
if: needs.files_changed.outputs.web_changed != '0'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: bin/web
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: npm install
|
||||||
|
- run: npm run lint
|
||||||
|
- run: npm run check
|
||||||
|
- run: npm run test
|
||||||
|
|
||||||
windows_installer_check_and_test:
|
windows_installer_check_and_test:
|
||||||
needs: files_changed
|
needs: files_changed
|
||||||
if: needs.files_changed.outputs.installer_changed != '0'
|
if: needs.files_changed.outputs.installer_changed != '0'
|
||||||
|
|||||||
Reference in New Issue
Block a user