mirror of
https://github.com/goauthentik/authentik
synced 2026-05-12 01:47:06 +02:00
92 lines
2.4 KiB
YAML
92 lines
2.4 KiB
YAML
---
|
|
name: CI - Web
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- next
|
|
- version-*
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- version-*
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
command:
|
|
- lint
|
|
- lint:lockfile
|
|
- tsc
|
|
- prettier-check
|
|
project:
|
|
- web
|
|
include:
|
|
- command: tsc
|
|
project: web
|
|
- command: lit-analyse
|
|
project: web
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5
|
|
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
|
|
with:
|
|
node-version-file: ${{ matrix.project }}/package.json
|
|
cache: "npm"
|
|
cache-dependency-path: ${{ matrix.project }}/package-lock.json
|
|
- working-directory: ${{ matrix.project }}/
|
|
run: |
|
|
npm ci
|
|
- name: Generate API
|
|
run: make gen-client-ts
|
|
- name: Lint
|
|
working-directory: ${{ matrix.project }}/
|
|
run: npm run ${{ matrix.command }}
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5
|
|
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
|
|
with:
|
|
node-version-file: web/package.json
|
|
cache: "npm"
|
|
cache-dependency-path: web/package-lock.json
|
|
- working-directory: web/
|
|
run: npm ci
|
|
- name: Generate API
|
|
run: make gen-client-ts
|
|
- name: build
|
|
working-directory: web/
|
|
run: npm run build
|
|
ci-web-mark:
|
|
if: always()
|
|
needs:
|
|
- build
|
|
- lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1
|
|
with:
|
|
jobs: ${{ toJSON(needs) }}
|
|
test:
|
|
needs:
|
|
- ci-web-mark
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5
|
|
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v5
|
|
with:
|
|
node-version-file: web/package.json
|
|
cache: "npm"
|
|
cache-dependency-path: web/package-lock.json
|
|
- working-directory: web/
|
|
run: npm ci
|
|
- name: Generate API
|
|
run: make gen-client-ts
|
|
- name: test
|
|
working-directory: web/
|
|
run: npm run test || exit 0
|