fix: security hardening #213
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SDK - Default | |
| 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 |