Add DX improvements: testing, createModel, session.wait, validation, … #51
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| registry-url: https://registry.npmjs.org/ | |
| - run: bun install --frozen-lockfile | |
| - name: Typecheck @usestratus/sdk | |
| run: bunx tsc -p packages/stratus-sdk/tsconfig.build.json --noEmit | |
| - name: Test @usestratus/sdk | |
| run: bun test packages/stratus-sdk/tests/core packages/stratus-sdk/tests/azure | |
| - name: Build | |
| run: bun run --filter '*' build | |
| - name: Release @usestratus/sdk if version is new | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| working-directory: packages/stratus-sdk | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| TAG="v$VERSION" | |
| if gh release view "$TAG" >/dev/null 2>&1; then | |
| echo "Release $TAG already exists, skipping" | |
| else | |
| echo "Creating release $TAG" | |
| gh release create "$TAG" --title "$TAG" --generate-notes | |
| echo "Publishing @usestratus/sdk@$VERSION to npm" | |
| npm publish --access public | |
| fi | |