Skip to content

Commit

Permalink
web: update CI workflows to use lockfile-lint for validity checking
Browse files Browse the repository at this point in the history
  • Loading branch information
kensternberg-authentik committed Jun 19, 2024
1 parent 8595b6c commit 0da3a82
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- working-directory: web/
run: |
[ -z "$(jq -r '.packages | to_entries[] | select((.key | startswith("node_modules")) and (.value | has("resolved") | not)) | .key' < package-lock.json)" ]
run: npm ci
- name: Test lockfile validity
run: npm run lint:lockfile
lint-build:
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- working-directory: website/
run: |
[ -z "$(jq -r '.packages | to_entries[] | select((.key | startswith("node_modules")) and (.value | has("resolved") | not)) | .key' < package-lock.json)" ]
run: npm ci
- name: Test lockfile validity
run: npm run lint:lockfile
lint-prettier:
runs-on: ubuntu-latest
steps:
Expand Down
113 changes: 113 additions & 0 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
"private": true,
"license": "MIT",
"scripts": {
"docusaurus": "docusaurus",
"watch": "docusaurus gen-api-docs all && docusaurus start",
"build": "cp ../docker-compose.yml static/docker-compose.yml && cp ../schema.yml static/schema.yaml && docusaurus gen-api-docs all && docusaurus build",
"build-bundled": "cp ../schema.yml static/schema.yaml && docusaurus gen-api-docs all && docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"serve": "docusaurus serve",
"prettier-check": "prettier --check .",
"docusaurus": "docusaurus",
"lint:lockfile": "lockfile-lint --path package.json --type npm --allowed-hosts npm --validate-https",
"prettier": "prettier --write .",
"test": "node --test"
"prettier-check": "prettier --check .",
"serve": "docusaurus serve",
"swizzle": "docusaurus swizzle",
"test": "node --test",
"watch": "docusaurus gen-api-docs all && docusaurus start"
},
"dependencies": {
"@docusaurus/core": "^3.4.0",
Expand Down Expand Up @@ -54,6 +55,7 @@
"@docusaurus/tsconfig": "^3.4.0",
"@docusaurus/types": "^3.3.2",
"@types/react": "^18.3.3",
"lockfile-lint": "^4.14.0",
"prettier": "3.3.2",
"typescript": "~5.4.5"
},
Expand Down

0 comments on commit 0da3a82

Please sign in to comment.