Skip to content

Commit

Permalink
feat: handle specs on separate lines (cypress-io#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov authored Feb 4, 2021
1 parent 4a94d7c commit bb3299e
Show file tree
Hide file tree
Showing 6 changed files with 1,356 additions and 1,155 deletions.
40 changes: 39 additions & 1 deletion .github/workflows/example-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push]
jobs:
start:
# example where we pass custom base URL
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1
Expand All @@ -16,3 +16,41 @@ jobs:
start: npm start
wait-on: 'http://localhost:3333'
config: baseUrl=http://localhost:3333

separate-specs:
# example where we pass specs to run via multiple lines
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Cypress tests
uses: ./
with:
working-directory: examples/config
build: npm run build
start: npm start
wait-on: 'http://localhost:3333'
config: baseUrl=http://localhost:3333
spec: |
cypress/integration/spec-a.js
cypress/integration/spec-b.js
separate-specs-with-wildcard:
# example where we pass specs to run via multiple lines and wildcards
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Cypress tests
uses: ./
with:
working-directory: examples/config
build: npm run build
start: npm start
wait-on: 'http://localhost:3333'
config: baseUrl=http://localhost:3333
spec: |
cypress/integration/spec-a.js
cypress/**/*-b.js
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,14 @@ jobs:
spec: cypress/integration/spec1.js
```

You can pass multiple multiple specs and wild card patterns using multi-line parameter, see [example-config.yml](./.github/workflows/example-config.yml):

```yml
spec: |
cypress/integration/spec-a.js
cypress/**/*-b.js
```

For more information, visit [the Cypress command-line docs](https://on.cypress.io/command-line#cypress-run-env-lt-env-gt).

### Project
Expand Down
Loading

0 comments on commit bb3299e

Please sign in to comment.