Skip to content

Commit 3a28e49

Browse files
ci: migrate sdk CI to GHA
1 parent 3797608 commit 3a28e49

File tree

4 files changed

+97
-423
lines changed

4 files changed

+97
-423
lines changed

.github/workflows/sdk-ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: dataprotector SDK - CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
paths:
8+
- 'packages/sdk/**'
9+
10+
concurrency:
11+
group: ${{ github.ref }}-sdk-ci
12+
cancel-in-progress: true
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: 18
23+
24+
- name: Install Dependencies
25+
working-directory: packages/sdk
26+
run: |
27+
npm ci
28+
npm run codegen
29+
30+
- name: Format
31+
working-directory: packages/sdk
32+
run: npm run lint
33+
34+
- name: Lint
35+
working-directory: packages/sdk
36+
run: npm run check-format
37+
38+
- name: Check types
39+
working-directory: packages/sdk
40+
run: npm run check-types
41+
42+
- name: Test Unit
43+
working-directory: packages/sdk
44+
run: npm run test:unit
45+
46+
- name: Prepare e2e test stack
47+
working-directory: packages/sdk
48+
run: npm run start-test-stack
49+
50+
- name: Test e2e
51+
working-directory: packages/sdk
52+
run: npm run test:e2e
53+
54+
- name: Stop e2e test stack
55+
working-directory: packages/sdk
56+
if: always()
57+
run: npm run stop-test-stack
58+
59+
build:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
64+
- uses: actions/setup-node@v4
65+
with:
66+
node-version: 18
67+
68+
- name: Install Dependencies
69+
working-directory: packages/sdk
70+
run: |
71+
npm ci
72+
npm run codegen
73+
74+
- name: Build
75+
working-directory: packages/sdk
76+
run: npm run build
77+
78+
- name: publish dry-run
79+
working-directory: packages/sdk
80+
run: npm publish --dry-run

0 commit comments

Comments
 (0)