[CI] run frontend checks

This commit is contained in:
Earl Warren 2024-02-25 23:08:09 +01:00
parent f991f107da
commit 5d2c4706d0
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -23,10 +23,22 @@ jobs:
- run: make --always-make -j$(nproc) lint-backend checks-backend # ensure the "go-licenses" make target runs - run: make --always-make -j$(nproc) lint-backend checks-backend # ensure the "go-licenses" make target runs
env: env:
TAGS: bindata sqlite sqlite_unlock_notify TAGS: bindata sqlite sqlite_unlock_notify
frontend-checks:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker
container:
image: 'docker.io/node:20-bookworm'
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
- run: make deps-frontend
- run: make lint-frontend
- run: make checks-frontend
- run: make test-frontend
- run: make frontend
test-unit: test-unit:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }} if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker runs-on: docker
needs: [backend-checks] needs: [backend-checks, frontend-checks]
container: container:
image: 'docker.io/node:20-bookworm' image: 'docker.io/node:20-bookworm'
services: services:
@ -67,7 +79,7 @@ jobs:
test-mysql: test-mysql:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }} if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker runs-on: docker
needs: [backend-checks] needs: [backend-checks, frontend-checks]
container: container:
image: 'docker.io/node:20-bookworm' image: 'docker.io/node:20-bookworm'
services: services:
@ -113,7 +125,7 @@ jobs:
test-pgsql: test-pgsql:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }} if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker runs-on: docker
needs: [backend-checks] needs: [backend-checks, frontend-checks]
container: container:
image: 'docker.io/node:20-bookworm' image: 'docker.io/node:20-bookworm'
services: services:
@ -161,7 +173,7 @@ jobs:
test-sqlite: test-sqlite:
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }} if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
runs-on: docker runs-on: docker
needs: [backend-checks] needs: [backend-checks, frontend-checks]
container: container:
image: 'docker.io/node:20-bookworm' image: 'docker.io/node:20-bookworm'
steps: steps: