Revert "chore(ci): fix live-smoke test vars" #135
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: Lint, Typecheck and Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint-typecheck-and-test: | |
| name: Lint, typecheck and test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Require changeset for release-relevant package changes | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| base_ref="${{ github.base_ref }}" | |
| diff_range="origin/${base_ref}...HEAD" | |
| has_release_changes=0 | |
| has_changeset=0 | |
| while IFS= read -r file; do | |
| case "$file" in | |
| .changeset/*.md) | |
| if [ "$file" != ".changeset/README.md" ]; then | |
| has_changeset=1 | |
| fi | |
| ;; | |
| packages/*) | |
| case "$file" in | |
| *.md|*/__tests__/*|*.test.*|*.spec.*) | |
| ;; | |
| *) | |
| has_release_changes=1 | |
| ;; | |
| esac | |
| ;; | |
| esac | |
| done <<EOF | |
| $(git diff --name-only "$diff_range") | |
| EOF | |
| if [ "$has_release_changes" -eq 1 ] && [ "$has_changeset" -eq 0 ]; then | |
| echo "Release-relevant changes were detected under packages/ without a changeset." | |
| echo "Run 'pnpm changeset' and commit the generated .changeset/*.md file in this PR." | |
| exit 1 | |
| fi | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.31.0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Lint | |
| run: pnpm run lint:check | |
| - name: Typecheck | |
| run: pnpm run typecheck | |
| - name: Test | |
| run: pnpm test | |
| - name: Integration test | |
| run: pnpm run test:integration | |
| changeset-live-smoke: | |
| name: Live integration test for Changesets PRs | |
| if: github.event_name == 'pull_request' && github.head_ref == 'changeset-release/main' | |
| runs-on: ubuntu-latest | |
| needs: lint-typecheck-and-test | |
| env: | |
| RYZOME_ENABLE_LIVE_SMOKE: "1" | |
| RYZOME_LIVE_SMOKE_API_KEY: ${{ secrets.RYZOME_LIVE_SMOKE_API_KEY }} | |
| RYZOME_LIVE_SMOKE_API_URL: ${{ vars.RYZOME_LIVE_SMOKE_API_URL }} | |
| RYZOME_LIVE_SMOKE_APP_URL: ${{ vars.RYZOME_LIVE_SMOKE_APP_URL }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.31.0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Validate live smoke configuration | |
| run: | | |
| test -n "$RYZOME_LIVE_SMOKE_API_KEY" || { | |
| echo "RYZOME_LIVE_SMOKE_API_KEY is required for Changesets PR live smoke checks." | |
| exit 1 | |
| } | |
| - name: Run live smoke integration test | |
| run: pnpm run test:integration |