-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (80 loc) · 2.37 KB
/
ci-pr.yml
File metadata and controls
95 lines (80 loc) · 2.37 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: CI (PR)
on:
pull_request:
concurrency:
group: ci-pr-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
changes:
runs-on: ubuntu-latest
outputs:
root: ${{ steps.filter.outputs.root }}
widget: ${{ steps.filter.outputs.widget }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Detect changed paths
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
root:
- 'main.ts'
- 'lib/**'
- 'scripts/**'
- 'drizzle/**'
- 'locales/**'
- 'deno.json'
- 'deno.lock'
- 'Dockerfile'
widget:
- 'widget/**'
root-checks:
name: Root checks
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.root == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Typecheck
run: deno check --allow-import main.ts
- name: Lint
run: deno lint
- name: Test
env:
AI_TOKEN: test
run: deno test -A
widget-checks:
name: Widget checks
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.widget == 'true'
defaults:
run:
working-directory: widget
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Typecheck
run: deno task check
- name: Lint
run: deno task lint
- name: Build
run: deno task build