-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #586 from Kocal/feat/pnpm
- Loading branch information
Showing
11 changed files
with
2,464 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
name: example-basic | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
jobs: | ||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cypress v9 and lower ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # | ||
|
||
basic-pnpm-ubuntu-18: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Cypress tests | ||
# normally you would write | ||
# uses: cypress-io/github-action@v2 | ||
uses: ./ | ||
# the parameters below are only necessary | ||
# because we are running these examples in a monorepo | ||
with: | ||
working-directory: examples/v9/basic-pnpm | ||
# just for full picture after installing Cypress | ||
# print information about detected browsers, etc | ||
# see https://on.cypress.io/command-line#cypress-info | ||
build: npx cypress info | ||
|
||
basic-pnpm-ubuntu-20: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Cypress tests | ||
uses: ./ | ||
with: | ||
working-directory: examples/v9/basic-pnpm | ||
build: npx cypress info | ||
|
||
basic-pnpm-on-windows: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Cypress tests | ||
uses: ./ | ||
with: | ||
working-directory: examples/v9/basic-pnpm | ||
build: npx cypress info | ||
|
||
basic-pnpm-on-mac: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Cypress tests | ||
uses: ./ | ||
with: | ||
working-directory: examples/v9/basic-pnpm | ||
build: npx cypress info | ||
|
||
# skips the binary installation | ||
# shows that the job should not fail | ||
# https://github.com/cypress-io/github-action/issues/327 | ||
basic-pnpm-without-binary-install: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Cypress tests | ||
uses: ./ | ||
with: | ||
working-directory: examples/v9/basic-pnpm | ||
# since we do not install Cypress | ||
# we should not attempt to run tests | ||
runTests: false | ||
env: | ||
# skip the binary install | ||
CYPRESS_INSTALL_BINARY: 0 | ||
|
||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cypress v10 and higher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # | ||
|
||
basic-pnpm-ubuntu-18-v10: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Cypress tests | ||
# normally you would write | ||
# uses: cypress-io/github-action@v2 | ||
uses: ./ | ||
# the parameters below are only necessary | ||
# because we are running these examples in a monorepo | ||
with: | ||
working-directory: examples/v10/basic-pnpm | ||
# just for full picture after installing Cypress | ||
# print information about detected browsers, etc | ||
# see https://on.cypress.io/command-line#cypress-info | ||
build: npx cypress info | ||
|
||
basic-pnpm-ubuntu-20-v10: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Cypress tests | ||
uses: ./ | ||
with: | ||
working-directory: examples/v10/basic-pnpm | ||
build: npx cypress info | ||
|
||
basic-pnpm-on-windows-v10: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Cypress tests | ||
uses: ./ | ||
with: | ||
working-directory: examples/v10/basic-pnpm | ||
build: npx cypress info | ||
|
||
basic-pnpm-on-mac-v10: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Cypress tests | ||
uses: ./ | ||
with: | ||
working-directory: examples/v10/basic-pnpm | ||
build: npx cypress info | ||
|
||
# skips the binary installation | ||
# shows that the job should not fail | ||
# https://github.com/cypress-io/github-action/issues/327 | ||
basic-pnpm-without-binary-install-v10: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
|
||
- name: Cypress tests | ||
uses: ./ | ||
with: | ||
working-directory: examples/v10/basic-pnpm | ||
# since we do not install Cypress | ||
# we should not attempt to run tests | ||
runTests: false | ||
env: | ||
# skip the binary install | ||
CYPRESS_INSTALL_BINARY: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const { defineConfig } = require('cypress') | ||
|
||
module.exports = defineConfig({ | ||
fixturesFolder: false, | ||
e2e: { | ||
setupNodeEvents(on, config) {}, | ||
supportFile: false, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
it('works', () => { | ||
expect(42).to.equal(21 + 21) | ||
cy.visit('https://example.cypress.io').then(() => { | ||
expect('hello').to.equal('hello') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "example-basic", | ||
"version": "1.0.0", | ||
"description": "basic example how to run Cypress tests", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "cypress run" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"private": true, | ||
"devDependencies": { | ||
"cypress": "^10.0.0" | ||
} | ||
} |
Oops, something went wrong.