Skip to content

Improve e2e command naming #445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 34 additions & 28 deletions .github/workflows/cypress-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,37 @@ name: cypress-run
on: push
jobs:
cypress-run:
runs-on: ubuntu-latest
# Browser on which the tests are run
container: cypress/browsers:node12.18.3-chrome87-ff82
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install dependencies
run: yarn
- name: Browser tests
uses: cypress-io/github-action@v2
with:
# Your starting script
start: yarn start:test-headless
# Creates and uploads GitHub artifacts in case of failure
- uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-videos
path: cypress/videos
runs-on: ubuntu-latest
# Browser on which the tests are run
container: cypress/browsers:node12.18.3-chrome87-ff82
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "16.x"
- name: Install dependencies
run: yarn --dev && yarn --cwd ./playgrounds/html
- name: Browser tests
uses: cypress-io/github-action@v2
with:
# Your starting script
start: yarn playground
# Creates and uploads GitHub artifacts in case of failure
- uses: actions/upload-artifact@v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I arrived too late but this one is still on v1?

if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-videos
path: cypress/videos
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Each PR should pass the tests and the linter to be accepted.
yarn test
# With auto-reload
yarn test:watch
# End-to-end tests
yarn test:e2e
# Linter
yarn lint
# Linter with auto-correct
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"lint:fix": "eslint --fix .",
"test": "./scripts/test",
"test:watch": "./scripts/test-watch",
"start:test": "concurrently --kill-others -s first \"yarn playground\" \"cypress open\"",
"start:test-headless": "concurrently --kill-others -s first \"yarn playground\" \"cypress run\""
"test:e2e:watch": "concurrently --kill-others -s first \"yarn playground\" \"cypress open\"",
"test:e2e": "concurrently --kill-others -s first \"yarn playground\" \"cypress run\""
},
"files": [
"dist/"
Expand Down
Loading