chore(ci) - add renovate (#840) #128
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 Main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Run CI checks and tests | |
| run: npm run ci | |
| deploy-remote-flows: | |
| name: Deploy Remote Flows Preview | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Deploy remote-flows to vercel | |
| id: vercel-remote-flows | |
| uses: amondnet/vercel-action@v20 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
| vercel-project-id: ${{ secrets.VERCEL_REMOTE_FLOWS_PROJECT_ID }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| github-comment: true | |
| scope: ${{ secrets.VERCEL_ORG_ID }} | |
| - name: Save deployment URL | |
| run: | | |
| echo "${{ steps.vercel-remote-flows.outputs.preview-url }}" > remote-flows-url.txt | |
| - name: Upload deployment URL | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: remote-flows-url | |
| path: remote-flows-url.txt | |
| deploy-example-app: | |
| name: Deploy Example App Preview | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Deploy remote-flows-example-app to vercel | |
| id: vercel-example-app | |
| uses: amondnet/vercel-action@v20 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
| vercel-project-id: ${{ secrets.VERCEL_EXAMPLE_APP_PROJECT_ID }} | |
| scope: ${{ secrets.VERCEL_ORG_ID }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| github-comment: true | |
| - name: Save deployment URL | |
| run: | | |
| echo "${{ steps.vercel-example-app.outputs.preview-url }}" > example-app-url.txt | |
| - name: Upload deployment URL | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: example-app-url | |
| path: example-app-url.txt | |
| e2e-tests: | |
| name: E2E Tests | |
| runs-on: ubuntu-latest | |
| needs: [unit-tests, deploy-remote-flows, deploy-example-app] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Install main package dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Install example/ dependencies | |
| working-directory: ./example | |
| run: npm ci | |
| - name: Install Playwright | |
| working-directory: ./example | |
| run: npx playwright install chromium --with-deps | |
| - name: Download remote-flows URL | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: remote-flows-url | |
| - name: Download example-app URL | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: example-app-url | |
| - name: Set deployment URLs | |
| id: set-urls | |
| run: | | |
| echo "REMOTE_FLOWS_URL=$(cat remote-flows-url.txt)" >> $GITHUB_ENV | |
| echo "EXAMPLE_APP_URL=$(cat example-app-url.txt)" >> $GITHUB_ENV | |
| - name: Run Playwright tests | |
| env: | |
| BASE_URL: ${{ env.REMOTE_FLOWS_URL }} | |
| VERCEL_BYPASS_TOKEN: ${{ secrets.VERCEL_BYPASS_TOKEN }} | |
| DEBUG: pw:api | |
| working-directory: ./example | |
| run: npx playwright test --project=chromium | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 30 | |
| deploy-production: | |
| name: Deploy to Production | |
| needs: [unit-tests, e2e-tests] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Promote remote-flows to production | |
| uses: amondnet/vercel-action@v20 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
| vercel-project-id: ${{ secrets.VERCEL_REMOTE_FLOWS_PROJECT_ID }} | |
| scope: ${{ secrets.VERCEL_ORG_ID }} | |
| vercel-args: '--prod' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| github-comment: true | |
| - name: Promote example app to production | |
| uses: amondnet/vercel-action@v20 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
| vercel-project-id: ${{ secrets.VERCEL_EXAMPLE_APP_PROJECT_ID }} | |
| scope: ${{ secrets.VERCEL_ORG_ID }} | |
| vercel-args: '--prod' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| github-comment: true |