test: add contract event emission tests for all state-changing functions #6
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: Vercel Preview | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| jobs: | ||
| ci: | ||
| name: CI gate | ||
| uses: ./.github/workflows/ci.yml | ||
|
Check failure on line 10 in .github/workflows/preview.yml
|
||
| secrets: inherit | ||
| deploy-preview: | ||
| needs: ci | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: write | ||
| deployments: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install Vercel CLI | ||
| run: npm install -g vercel@latest | ||
| - name: Deploy preview | ||
| id: deploy | ||
| env: | ||
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | ||
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
| run: | | ||
| url=$(vercel deploy --token "$VERCEL_TOKEN" --yes 2>&1 | tail -1) | ||
| echo "url=$url" >> "$GITHUB_OUTPUT" | ||
| - name: Comment preview URL on PR | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const url = '${{ steps.deploy.outputs.url }}'; | ||
| await github.rest.issues.createComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| body: `### 🔍 Vercel Preview Deployment\n\n**URL:** ${url}\n\n> Uses Stellar **testnet** contract addresses.`, | ||
| }); | ||