mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-16 14:43:39 +00:00
ci/cd: add svelte-check workflow for the frontend
This commit is contained in:
21
.github/svelte-check-matcher.json
vendored
Normal file
21
.github/svelte-check-matcher.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "svelte-check",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^([^\\s].*):(\\d+):(\\d+)$",
|
||||||
|
"file": 1,
|
||||||
|
"line": 2,
|
||||||
|
"column": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"regexp": "^\\s*(Error|Warning):\\s*(.*)\\s+\\((?:ts|js|svelte)\\)$",
|
||||||
|
"severity": 1,
|
||||||
|
"message": 2,
|
||||||
|
"loop": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
55
.github/workflows/svelte-check.yml
vendored
Normal file
55
.github/workflows/svelte-check.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
name: Svelte Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
paths:
|
||||||
|
- "frontend/src/**"
|
||||||
|
- ".github/svelte-check-matcher.json"
|
||||||
|
- "frontend/package.json"
|
||||||
|
- "frontend/package-lock.json"
|
||||||
|
- "frontend/tsconfig.json"
|
||||||
|
- "frontend/svelte.config.js"
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
paths:
|
||||||
|
- "frontend/src/**"
|
||||||
|
- ".github/svelte-check-matcher.json"
|
||||||
|
- "frontend/package.json"
|
||||||
|
- "frontend/package-lock.json"
|
||||||
|
- "frontend/tsconfig.json"
|
||||||
|
- "frontend/svelte.config.js"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
type-check:
|
||||||
|
name: Run Svelte Check
|
||||||
|
# Don't run on dependabot branches
|
||||||
|
if: github.actor != 'dependabot[bot]'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
checks: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "lts/*"
|
||||||
|
cache: "npm"
|
||||||
|
cache-dependency-path: frontend/package-lock.json
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: frontend
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Add svelte-check problem matcher
|
||||||
|
run: echo "::add-matcher::.github/svelte-check-matcher.json"
|
||||||
|
|
||||||
|
- name: Run svelte-check
|
||||||
|
working-directory: frontend
|
||||||
|
run: npm run check
|
||||||
Reference in New Issue
Block a user