percy / percy-ember

Ember addon for visual regression testing with Percy
https://docs.percy.io/docs/ember
MIT License
73 stars 44 forks source link

How to use as a github action? #330

Closed runspired closed 3 years ago

runspired commented 3 years ago

With the deprecation of all the nice action flows, how does one use this in an action now?

Robdel12 commented 3 years ago

Hey @runspired! The action only was needed to set env vars for Percy. Now you can run your test command in your CI config however that usually happens. For example, if this was before:

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: "ember test"
        env:
          PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}

It would be now:

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 -- ember test
        env:
          PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
github-actions[bot] commented 3 years ago

This issue is stale because it has been open for more than 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.