-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (85 loc) · 2.71 KB
/
test.yaml
File metadata and controls
91 lines (85 loc) · 2.71 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
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v5
with:
node-version: '22'
cache: 'pnpm'
- run: node --experimental-strip-types scripts/generate.ts
- run: pnpm install
- run: pnpm test:unit
integration:
name: Integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v5
with:
node-version: '22'
cache: 'pnpm'
- run: node --experimental-strip-types scripts/generate.ts
- run: pnpm install
- run: pnpm build
- run: pnpm test:integration
toolkit:
name: Toolkit package tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v5
with:
node-version: '22'
cache: 'pnpm'
- run: node --experimental-strip-types scripts/generate.ts
- run: pnpm install
- name: Build toolkit packages
run: |
pnpm --filter @constructive-io/fn-types build
pnpm --filter @constructive-io/knative-job-fn build
pnpm --filter @constructive-io/fn-runtime build
pnpm --filter @constructive-io/fn-generator build
pnpm --filter @constructive-io/fn-client build
pnpm --filter @constructive-io/fn-cli build
- name: Run toolkit unit tests
run: |
pnpm --filter @constructive-io/fn-generator test
pnpm --filter @constructive-io/fn-client test
pnpm --filter @constructive-io/fn-cli test
fn-init-e2e:
name: fn init end-to-end
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v5
with:
node-version: '22'
cache: 'pnpm'
- run: node --experimental-strip-types scripts/generate.ts
- run: pnpm install
- name: Build fn-cli (transitive)
run: |
pnpm --filter @constructive-io/fn-types build
pnpm --filter @constructive-io/knative-job-fn build
pnpm --filter @constructive-io/fn-runtime build
pnpm --filter @constructive-io/fn-generator build
pnpm --filter @constructive-io/fn-client build
pnpm --filter @constructive-io/fn-cli build
- name: Binary integration test
run: pnpm exec jest tests/integration/fn-init.test.ts