percy / exec-action

A (deprecated) GitHub action to run Percy Agent `percy exec` commands
https://docs.percy.io/docs/github-actions#section-exec-action
MIT License
8 stars 5 forks source link
actions percy percy-gh-action

Percy

Deprecated

⚠️ This action is only required if you're using an older SDK not using Percy CLI. In Percy CLI, GitHub actions will work out of the box.

Example for how to migrate

### Before ```yml name: CI on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@master - name: Install run: yarn - name: Percy Test uses: percy/exec-action@v0.3.1 with: command: "[your-test-command]" env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} ``` ### After ```yml name: CI on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@master - name: Install run: yarn - name: Percy Test run: npx percy exec -- [your-test-command] env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} ```


A GitHub action to run percy exec CLI commands for visual testing. Full API docs for this action can be found here

Quick start

To use the Percy exec GitHub action you will need to add a new step to your actions config using the percy/exec-action action. exec-action has one required input: the command to run your tests. You will also need to set your PERCY_TOKEN in your GitHub projects settings.

Below is a sample config that runs Cypress with Percy:

name: CI
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@master
      - name: Install
        run: yarn
      - name: Percy Test
        uses: percy/exec-action@v0.3.1
        with:
          command: "cypress run"
        env:
          PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}