-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (101 loc) · 3.06 KB
/
Copy pathci-sdks.yml
File metadata and controls
105 lines (101 loc) · 3.06 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
96
97
98
99
100
101
102
103
104
105
name: SDKs CI
on:
pull_request:
paths:
- sdks/bun-worker/**
- sdks/typescript/**
- samples/bun-worker/**
- .github/workflows/ci-sdks.yml
push:
paths:
- sdks/bun-worker/**
- sdks/typescript/**
- samples/bun-worker/**
- .github/workflows/ci-sdks.yml
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-latest
outputs:
bun_worker: ${{ steps.filter.outputs.bun_worker }}
typescript_sdk: ${{ steps.filter.outputs.typescript_sdk }}
bun_worker_sample: ${{ steps.filter.outputs.bun_worker_sample }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Filter paths
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
bun_worker:
- 'sdks/bun-worker/**'
typescript_sdk:
- 'sdks/typescript/**'
bun_worker_sample:
- 'samples/bun-worker/**'
bun-worker:
name: Bun Worker
runs-on: ${{ matrix.os }}
needs: changes
if: needs.changes.outputs.bun_worker == 'true' || needs.changes.outputs.typescript_sdk == 'true'
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install TypeScript SDK deps
run: npm install
working-directory: sdks/typescript
- name: TypeScript SDK type-check
if: needs.changes.outputs.typescript_sdk == 'true'
run: npm run type-check
working-directory: sdks/typescript
- name: Install Bun worker deps
run: bun install
working-directory: sdks/bun-worker
- name: Bun worker type-check
run: bun run type-check
working-directory: sdks/bun-worker
- name: Bun worker tests
run: bun run test
working-directory: sdks/bun-worker
bun-worker-sample:
name: Bun Worker Sample
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.bun_worker_sample == 'true' || needs.changes.outputs.bun_worker == 'true' || needs.changes.outputs.typescript_sdk == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install TypeScript SDK deps
run: npm install
working-directory: sdks/typescript
- name: Install Bun worker deps
run: bun install
working-directory: sdks/bun-worker
- name: Install sample deps
run: bun install
working-directory: samples/bun-worker
- name: Sample type-check
run: bun run type-check
working-directory: samples/bun-worker