Merge pull request #311 from bahmutov/add-cypress-workflow

add Cypress starter workflow
This commit is contained in:
Andy McKay
2020-08-21 15:00:18 -07:00
committed by GitHub
3 changed files with 69 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
name: Cypress
on: [push]
env:
CI: 1 # minimal progress output
TERM: xterm # good terminal rendering
jobs:
# for simpler configuration you can use 3rd party action
# https://github.com/cypress-io/github-action
e2e:
name: Cypress tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache NPM modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Cache Cypress binary
uses: actions/cache@v1
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-cypress-
- name: install Cypress
run: |
npm ci
npx cypress verify
- name: E2E tests
run: npx cypress run
# save any error screenshots as test artifacts
- uses: actions/upload-artifact@v1
if: failure()
with:
name: screenshots
path: cypress/screenshots
# video should always be generated
- uses: actions/upload-artifact@v1
with:
name: videos
path: cypress/videos
+6
View File
@@ -0,0 +1,6 @@
{
"name": "Cypress",
"description": "Run end-to-end web application tests using Cypress.io",
"iconName": "cypress",
"categories": ["Testing", "Cypress"]
}
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
<style type="text/css">
.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#4A4A4D;stroke:#FFFFFF;stroke-miterlimit:10;}
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
</style>
<path class="st0" d="M35.5,9C50.7,9,63,21.3,63,36.5S50.7,64,35.5,64C20.3,64,8,51.7,8,36.5S20.3,9,35.5,9L35.5,9z"/>
<path class="st1" d="M50.1,48.6c-1,3.1-2.5,5.4-4.6,7.1c-2.1,1.7-4.9,2.6-8.4,2.9l-0.7-4.6c2.3-0.3,4-0.8,5.1-1.6
c0.4-0.3,1.2-1.2,1.2-1.2l0,0l-8.3-26.6h6.9l4.8,19.9l5.1-19.9h6.7L50.1,48.6L50.1,48.6z"/>
<path class="st1" d="M26,23.7c1.6,0,3.1,0.2,4.3,0.7c1.3,0.5,2.5,1.2,3.7,2.2l-2.8,3.8c-0.8-0.6-1.6-1-2.3-1.3
c-0.7-0.3-1.6-0.4-2.4-0.4c-3.4,0-5.1,2.6-5.1,7.9c0,2.7,0.4,4.6,1.3,5.7c0.9,1.2,2.1,1.7,3.8,1.7c0.8,0,1.6-0.1,2.3-0.4
c0.7-0.3,1.5-0.7,2.5-1.3l2.8,4c-2.3,1.9-4.9,2.8-7.9,2.8c-2.4,0-4.4-0.5-6.2-1.5c-1.7-1-3.1-2.5-4-4.4c-0.9-1.9-1.4-4.1-1.4-6.7
c0-2.5,0.5-4.8,1.4-6.7c0.9-2,2.3-3.5,4-4.6C21.7,24.3,23.7,23.7,26,23.7L26,23.7z"/>
</svg>
<!-- source https://github.com/cypress-io/cypress-icons -->

After

Width:  |  Height:  |  Size: 1.2 KiB