Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions .github/workflows/sdk-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: dataprotector SDK - CI

on:
pull_request:
branches:
- '*'
paths:
- 'packages/sdk/**'
# also trigger sdk tests when subgraph is modified to ensure backward compatibility
- 'packages/subgraph/**'

concurrency:
group: ${{ github.ref }}-sdk-ci
cancel-in-progress: true

jobs:
check-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: packages/sdk/package-lock.json

- name: Install Dependencies
working-directory: packages/sdk
run: npm ci && npm run codegen

- name: Lint
working-directory: packages/sdk
run: npm run lint

- name: Check formatting
working-directory: packages/sdk
run: npm run check-format

- name: Check types
working-directory: packages/sdk
run: npm run check-types

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: packages/sdk/package-lock.json

- name: Install Dependencies
working-directory: packages/sdk
run: npm ci && npm run codegen

- name: Test unit
working-directory: packages/sdk
run: npm run test:unit

- name: Start e2e test stack
working-directory: packages/sdk
run: npm run start-test-stack

- name: Test e2e
working-directory: packages/sdk
run: npm run test:e2e

- name: Stop e2e test stack
working-directory: packages/sdk
if: always()
run: npm run stop-test-stack

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: packages/sdk/package-lock.json

- name: Install Dependencies
working-directory: packages/sdk
run: npm ci && npm run codegen

- name: Build
working-directory: packages/sdk
run: npm run build

- name: publish dry-run
working-directory: packages/sdk
run: npm publish --dry-run
Loading
Loading