Add the steps below to your workflow and define the folder that contains your screenshot.
runs-on: ubuntu-latest
steps:
- name: Yarn Install
run: yarn
- name: Percy Test
run: npx percy upload ${{ github.workspace }}/yourfolder
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
Example of use
Use with robot framework with Browser Lib using Take Screenshot, after running the tests the folder generated by the robot is uploaded
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Create folder for reports
run: mkdir -m 777 Reports
- name: Execute Robot tests
uses: carlosnizolli/robotframework-docker-action@browser
if: always()
env:
DOCKER_SHM_SIZE: 11000000
BROWSER: firefox
ROBOT_TESTS_DIR: ${{ github.workspace }}/Tests
ROBOT_REPORTS_DIR: ${{ github.workspace }}/Reports
- name: Yarn Install
if: always()
run: yarn
- name: Percy Test
if: always()
run: npx percy upload ${{ github.workspace }}/Reports/browser/screenshot
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}