f283160942
* root: specify node and python versions in respective config files, deduplicate in CI Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix engines missing for wdio Signed-off-by: Jens Langhammer <jens@goauthentik.io> * bump setup python version Signed-off-by: Jens Langhammer <jens@goauthentik.io> * actually don't bump a bunch of things Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
123 lines
3.1 KiB
YAML
123 lines
3.1 KiB
YAML
name: authentik-ci-web
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- next
|
|
- version-*
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- version-*
|
|
|
|
jobs:
|
|
lint-eslint:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
project:
|
|
- web
|
|
- tests/wdio
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
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: Eslint
|
|
working-directory: ${{ matrix.project }}/
|
|
run: npm run lint
|
|
lint-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
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: TSC
|
|
working-directory: web/
|
|
run: npm run tsc
|
|
lint-prettier:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
project:
|
|
- web
|
|
- tests/wdio
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
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: prettier
|
|
working-directory: ${{ matrix.project }}/
|
|
run: npm run prettier-check
|
|
lint-lit-analyse:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: web/package.json
|
|
cache: "npm"
|
|
cache-dependency-path: web/package-lock.json
|
|
- working-directory: web/
|
|
run: |
|
|
npm ci
|
|
# lit-analyse doesn't understand path rewrites, so make it
|
|
# belive it's an actual module
|
|
cd node_modules/@goauthentik
|
|
ln -s ../../src/ web
|
|
- name: Generate API
|
|
run: make gen-client-ts
|
|
- name: lit-analyse
|
|
working-directory: web/
|
|
run: npm run lit-analyse
|
|
ci-web-mark:
|
|
needs:
|
|
- lint-eslint
|
|
- lint-prettier
|
|
- lint-lit-analyse
|
|
- lint-build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: echo mark
|
|
build:
|
|
needs:
|
|
- ci-web-mark
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
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
|