refactor: simplify DLNA content features and media type handling #1020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| # The pipewire pkg-config exposes -fno-strict-overflow, which cgo rejects | |
| # unless it is explicitly allowed. Every step that compiles cgo needs it, | |
| # not just the -race test. | |
| env: | |
| CGO_CFLAGS_ALLOW: -fno-strict-overflow | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install Linux deps | |
| run: sudo apt update && sudo apt install -y xorg-dev libwayland-dev libxkbcommon-dev libegl-dev libpipewire-0.3-dev pkg-config | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| run: go test -race -v ./... | |
| webui: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install web deps | |
| run: npm ci | |
| - name: Test | |
| run: npm test | |
| - name: Verify dist matches src | |
| # internal/webui/dist is committed and embedded into the Go binary, so a | |
| # rebuild must be a no-op. Otherwise the shipped UI silently lags its source. | |
| run: | | |
| npm run build:webui | |
| if [ -n "$(git status --porcelain internal/webui/dist)" ]; then | |
| echo "internal/webui/dist is stale. Run 'npm run build:webui' and commit the result." | |
| git status --porcelain internal/webui/dist | |
| exit 1 | |
| fi |