-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (40 loc) · 1.1 KB
/
check.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Check
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [21.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up SvelteKit on Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Cache Dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ github.event.pull_request.number }}-
- name: Install Dependencies
run: npm ci
- name: Set up .env
run: cp .env.example .env
- name: Set up .env
run: cp .env.example .env
- name: Svelte check
run: npm run check
- name: Format
run: npm run format && git diff --exit-code
- name: Lint
run: npm run lint && git diff --exit-code