Skip to content

Conversation

@ethriel3695
Copy link
Contributor

@ethriel3695 ethriel3695 commented Mar 11, 2025

Support the deployment_status event type for Github Actions.

This allows consumers to support running Playwright or Cypress tests after a deployment is complete to a third party platform such as Vercel when using the action in the same workflow file.

Fixes #647

Example Configuration

The following configuration currently exits with an error for unsupported event type. This PR fixes the error.

name: Chromatic

on:
  deployment_status:
  
jobs:
  playwright:
    container:
      image: mcr.microsoft.com/playwright:v1.49.0-jammy
    steps:
      - uses: actions/checkout@v4
      
      - name: Run Playwright Tests
        run: npx playwright test
        env:
          PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.target_url }}
          
      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: playwright-results
          path: ./playwright-report
          retention-days: 30

  chromatic:
    name: Run Chromatic
    needs: playwright
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4 
      
      - uses: actions/download-artifact@v4
        with:
          path: ${{ github.workspace }}
          
      - name: Chromatic
        uses: chromaui/action@latest
        with:
          playwright: true
          projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
📦 Published PR as canary version: 11.28.0--canary.1165.13792095216.0

✨ Test out this PR locally via:

npm install [email protected]
# or 
yarn add [email protected]

@github-actions
Copy link
Contributor

📦 Package Size: 5580 KB
✅ Compared to main: 0 KB 958f218 (5580 KB)

@codecov
Copy link

codecov bot commented Mar 11, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.18%. Comparing base (958f218) to head (0749e24).

Files with missing lines Patch % Lines
action-src/main.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1165      +/-   ##
==========================================
- Coverage   70.19%   70.18%   -0.01%     
==========================================
  Files         203      203              
  Lines        7385     7386       +1     
  Branches     1308     1310       +2     
==========================================
  Hits         5184     5184              
- Misses       2178     2179       +1     
  Partials       23       23              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ethriel3695
Copy link
Contributor Author

Credit to https://github.com/carbonrobot
The Fork won't run our CI jobs so I created an identical PR.

@ethriel3695 ethriel3695 added enhancement Classification: New feature or request release Auto: Create a `latest` release when merged minor Auto: Increment the minor version when merged labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Classification: New feature or request minor Auto: Increment the minor version when merged release Auto: Create a `latest` release when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chroma GH Action

2 participants