2021-08-30 18:21:15 +00:00
|
|
|
name: authentik-ci-web
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-09-03 08:53:39 +00:00
|
|
|
branches:
|
2022-06-03 17:40:09 +00:00
|
|
|
- main
|
2021-09-03 08:53:39 +00:00
|
|
|
- next
|
|
|
|
- version-*
|
|
|
|
pull_request:
|
2021-09-07 08:06:30 +00:00
|
|
|
branches:
|
2022-06-03 17:40:09 +00:00
|
|
|
- main
|
2021-08-30 18:21:15 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint-eslint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 04:42:41 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-18 04:21:59 +00:00
|
|
|
- uses: actions/setup-node@v3.8.1
|
2021-08-30 18:21:15 +00:00
|
|
|
with:
|
2023-04-21 10:54:23 +00:00
|
|
|
node-version: "20"
|
|
|
|
cache: "npm"
|
2021-08-30 18:21:15 +00:00
|
|
|
cache-dependency-path: web/package-lock.json
|
2022-05-09 19:22:41 +00:00
|
|
|
- working-directory: web/
|
|
|
|
run: npm ci
|
2021-08-30 18:21:15 +00:00
|
|
|
- name: Generate API
|
2022-09-11 21:01:26 +00:00
|
|
|
run: make gen-client-ts
|
2021-08-30 18:21:15 +00:00
|
|
|
- name: Eslint
|
2022-05-09 19:22:41 +00:00
|
|
|
working-directory: web/
|
|
|
|
run: npm run lint
|
2023-01-01 22:32:05 +00:00
|
|
|
lint-build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 04:42:41 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-18 04:21:59 +00:00
|
|
|
- uses: actions/setup-node@v3.8.1
|
2023-01-01 22:32:05 +00:00
|
|
|
with:
|
2023-04-21 10:54:23 +00:00
|
|
|
node-version: "20"
|
|
|
|
cache: "npm"
|
2023-01-01 22:32:05 +00:00
|
|
|
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
|
2021-08-30 18:21:15 +00:00
|
|
|
lint-prettier:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 04:42:41 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-18 04:21:59 +00:00
|
|
|
- uses: actions/setup-node@v3.8.1
|
2021-08-30 18:21:15 +00:00
|
|
|
with:
|
2023-04-21 10:54:23 +00:00
|
|
|
node-version: "20"
|
|
|
|
cache: "npm"
|
2021-08-30 18:21:15 +00:00
|
|
|
cache-dependency-path: web/package-lock.json
|
2022-05-09 19:22:41 +00:00
|
|
|
- working-directory: web/
|
|
|
|
run: npm ci
|
2021-08-30 18:21:15 +00:00
|
|
|
- name: Generate API
|
2022-09-11 21:01:26 +00:00
|
|
|
run: make gen-client-ts
|
2021-08-30 18:21:15 +00:00
|
|
|
- name: prettier
|
2022-05-09 19:22:41 +00:00
|
|
|
working-directory: web/
|
|
|
|
run: npm run prettier-check
|
2021-08-30 18:21:15 +00:00
|
|
|
lint-lit-analyse:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 04:42:41 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-18 04:21:59 +00:00
|
|
|
- uses: actions/setup-node@v3.8.1
|
2021-08-30 18:21:15 +00:00
|
|
|
with:
|
2023-04-21 10:54:23 +00:00
|
|
|
node-version: "20"
|
|
|
|
cache: "npm"
|
2021-08-30 18:21:15 +00:00
|
|
|
cache-dependency-path: web/package-lock.json
|
2022-05-09 19:22:41 +00:00
|
|
|
- working-directory: web/
|
2022-06-25 15:44:17 +00:00
|
|
|
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
|
2021-08-30 18:21:15 +00:00
|
|
|
- name: Generate API
|
2022-09-11 21:01:26 +00:00
|
|
|
run: make gen-client-ts
|
2021-09-28 07:39:21 +00:00
|
|
|
- name: lit-analyse
|
2022-05-09 19:22:41 +00:00
|
|
|
working-directory: web/
|
|
|
|
run: npm run lit-analyse
|
2021-12-08 20:00:58 +00:00
|
|
|
ci-web-mark:
|
2021-08-30 18:21:15 +00:00
|
|
|
needs:
|
|
|
|
- lint-eslint
|
|
|
|
- lint-prettier
|
|
|
|
- lint-lit-analyse
|
2023-01-01 22:36:14 +00:00
|
|
|
- lint-build
|
2021-08-30 18:21:15 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-12-08 20:00:58 +00:00
|
|
|
steps:
|
|
|
|
- run: echo mark
|
|
|
|
build:
|
|
|
|
needs:
|
|
|
|
- ci-web-mark
|
|
|
|
runs-on: ubuntu-latest
|
2021-08-30 18:21:15 +00:00
|
|
|
steps:
|
2023-09-05 04:42:41 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-18 04:21:59 +00:00
|
|
|
- uses: actions/setup-node@v3.8.1
|
2021-08-30 18:21:15 +00:00
|
|
|
with:
|
2023-04-21 10:54:23 +00:00
|
|
|
node-version: "20"
|
|
|
|
cache: "npm"
|
2021-08-30 18:21:15 +00:00
|
|
|
cache-dependency-path: web/package-lock.json
|
2022-05-09 19:22:41 +00:00
|
|
|
- working-directory: web/
|
|
|
|
run: npm ci
|
2021-08-30 18:21:15 +00:00
|
|
|
- name: Generate API
|
2022-09-11 21:01:26 +00:00
|
|
|
run: make gen-client-ts
|
2021-08-30 18:21:15 +00:00
|
|
|
- name: build
|
2022-05-09 19:22:41 +00:00
|
|
|
working-directory: web/
|
|
|
|
run: npm run build
|