-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 1.79 KB
/
typescript.yml
File metadata and controls
72 lines (61 loc) · 1.79 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
# Deno TypeScript Build and Test workflow
# Optimized with Deno caching, matrix strategy, and path-based triggers
name: Deno TypeScript Build
on:
push:
branches: ["main"]
paths:
- 'src/rules-compiler-typescript/**'
- 'src/adguard-api-typescript/**'
- 'src/linear/**'
- '.github/workflows/typescript.yml'
pull_request:
branches: ["main"]
paths:
- 'src/rules-compiler-typescript/**'
- 'src/adguard-api-typescript/**'
- 'src/linear/**'
- '.github/workflows/typescript.yml'
jobs:
build:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Rules Compiler (Deno)
path: src/rules-compiler-typescript
has_tests: true
- name: AdGuard API Client (Deno)
path: src/adguard-api-typescript
has_tests: true
- name: Linear Import Tool (Deno)
path: src/linear
has_tests: false
defaults:
run:
working-directory: ${{ matrix.path }}
steps:
- uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Cache Deno dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/deno
~/.deno
key: ${{ runner.os }}-deno-${{ hashFiles('**/deno.lock', '**/deno.json') }}
restore-keys: ${{ runner.os }}-deno-
- name: Type check
run: deno task check
- name: Lint
run: deno task lint
- name: Format check
run: deno fmt --check src/
- name: Test
if: matrix.has_tests
run: deno task test