Publish binaries #517
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] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .node-version | |
| - run: corepack enable | |
| - run: corepack prepare pnpm@11.1.3 --activate | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| - run: go test ./... | |
| - run: go build ./cmd/emulate | |
| - run: node scripts/build-native-assets.mjs | |
| - name: Native AWS SDK E2E | |
| run: | | |
| go build -o /tmp/emulate-native ./cmd/emulate | |
| /tmp/emulate-native start --service aws --port 4017 & | |
| server_pid=$! | |
| trap 'kill "$server_pid" 2>/dev/null || true' EXIT | |
| for attempt in {1..50}; do | |
| if curl -fsS http://127.0.0.1:4017/_emulate/health >/dev/null; then | |
| ready=1 | |
| break | |
| fi | |
| sleep 0.2 | |
| done | |
| test "${ready:-}" = "1" | |
| AWS_EMULATOR_E2E_URL=http://127.0.0.1:4017 pnpm --dir packages/@emulators/aws exec vitest run src/__tests__/aws-sdk.e2e.test.ts -t "s3|sqs|sns|iam|sts|dynamodb|eventbridge" | |
| - name: Native Resend SDK E2E | |
| run: | | |
| go build -o /tmp/emulate-native ./cmd/emulate | |
| /tmp/emulate-native start --service resend --port 4018 & | |
| server_pid=$! | |
| trap 'kill "$server_pid" 2>/dev/null || true' EXIT | |
| for attempt in {1..50}; do | |
| if curl -fsS http://127.0.0.1:4018/_emulate/health >/dev/null; then | |
| ready=1 | |
| break | |
| fi | |
| sleep 0.2 | |
| done | |
| test "${ready:-}" = "1" | |
| RESEND_EMULATOR_E2E_URL=http://127.0.0.1:4018 pnpm --dir packages/@emulators/resend exec vitest run src/__tests__/resend-sdk.e2e.test.ts -t "real resend SDK E2E" | |
| - run: node scripts/sync-versions.mjs --check | |
| - run: pnpm format:check | |
| - run: pnpm type-check | |
| - run: pnpm lint | |
| - run: pnpm test |