Skip to content

Commit

Permalink
ci: add webui linter
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwitzko committed Feb 7, 2024
1 parent 9816789 commit 88e11e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,25 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- run: mkdir webui/out && touch webui/out/index.html
- uses: golangci/golangci-lint-action@v3
lint-webui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: ./scripts/lint-webui.sh

test:
runs-on: ubuntu-latest
needs: lint
needs: [lint, lint-webui]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- uses: oven-sh/setup-bun@v1
- run: ./scripts/build-webui.sh 0.0.0-dev
- run: go build ./cmd/wg-hub/
env:
CGO_ENABLED: 0
Expand Down
8 changes: 8 additions & 0 deletions scripts/lint-webui.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -euo pipefail

cd webui
bun install
bun run check-format
bun run lint

0 comments on commit 88e11e2

Please sign in to comment.