Skip to content

Commit

Permalink
test: rework example-chrome workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcC399 committed Sep 18, 2023
1 parent 1e81873 commit ecb3356
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/example-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,40 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Cypress info
- name: Chrome headless
uses: ./
with:
# just for full picture after installing Cypress
# print information about detected browsers, etc
# Print information about the system and current environment
# including detected browsers
# which are pre-installed in GitHub-hosted runners
# see https://on.cypress.io/command-line#cypress-info
# For convenience, (mis-)use build parameter to get cypress info
build: npx cypress info
working-directory: examples/browser

- name: Chrome
uses: ./
with:
working-directory: examples/browser
browser: chrome
# As of Cypress v8.0 the `cypress run` command
# executes tests in `headless` mode by default

- uses: actions/upload-artifact@v3
with:
name: screenshots-in-chrome
name: screenshots-headless-chrome
path: examples/browser/cypress/screenshots

- run: npx image-size cypress/screenshots/**/*.png
working-directory: examples/browser

- name: Chrome headless
- name: Chrome headed
uses: ./
with:
# Cypress and dependencies are already installed
install: false
working-directory: examples/browser
browser: chrome
headed: false
headed: true

- uses: actions/upload-artifact@v3
with:
name: screenshots-in-headless-chrome
name: screenshots-headed-chrome
path: examples/browser/cypress/screenshots

- run: npx image-size cypress/screenshots/**/*.png
Expand Down

0 comments on commit ecb3356

Please sign in to comment.