-
Notifications
You must be signed in to change notification settings - Fork 672
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 #1845 from system-ui/ci/cypress
Setup Cypress
- Loading branch information
Showing
20 changed files
with
1,141 additions
and
94 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,50 @@ | ||
name: 'End-to-End Tests' | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
push: | ||
branches: | ||
- develop | ||
- stable | ||
jobs: | ||
run-cypress: | ||
runs-on: ubuntu-latest | ||
# container: cypress/browsers:node12.13.0-chrome78-ff70 | ||
strategy: | ||
# when one test fails, DO NOT cancel the other | ||
# containers, because this will kill Cypress processes | ||
# leaving the Dashboard hanging ... | ||
# https://github.com/cypress-io/github-action/issues/48 | ||
fail-fast: false | ||
matrix: | ||
containers: [1] # todo: change to [1, 2] - there's only 1 test file now | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.x | ||
|
||
- uses: bahmutov/npm-install@v1 | ||
with: | ||
install-command: yarn --pure-lockfile --non-interactive | ||
|
||
- run: yarn build:docs | ||
|
||
- uses: cypress-io/github-action@v2 | ||
with: | ||
record: true | ||
parallel: true | ||
working-directory: packages/e2e | ||
command: yarn record | ||
start: yarn serve-docs | ||
wait-on: 'http://localhost:9000' | ||
tag: ${{ github.event_name }} | ||
env: | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COMMIT_INFO_MESSAGE: | ||
${{ github.event.pull_request.title && format('PR {0} - {1}', | ||
github.event.pull_request.number, github.event.pull_request.title) | ||
}} |
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 |
---|---|---|
|
@@ -9,8 +9,9 @@ coverage | |
.idea | ||
.vscode | ||
.envrc | ||
.envrc.ps1 | ||
.publish-log.txt | ||
.yarn-error.log | ||
|
||
|
||
.vercel | ||
|
||
.vercel |
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
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,93 @@ | ||
/** @jsx jsx */ | ||
import { jsx } from 'theme-ui' | ||
|
||
// Straight-up copied from README.md | ||
// We may extract it from that Markdown file in a fancy way some day. Maybe... | ||
export default function ReadmeBadges() { | ||
return ( | ||
<div | ||
data-testid="readme-badges" | ||
sx={{ | ||
display: 'flex', | ||
flexWrap: 'wrap', | ||
gap: '2px', | ||
'> a': { height: '20px' }, | ||
}}> | ||
<a href="https://github.com/system-ui/theme-ui"> | ||
<img | ||
src="https://badgen.net/badge/-/github?icon=github&label" | ||
alt="GitHub" | ||
/> | ||
</a> | ||
<a href="https://github.com/system-ui/theme-ui/stargazers"> | ||
<img | ||
src="https://badgen.net/github/stars/system-ui/theme-ui" | ||
alt="GitHub Stars" | ||
/> | ||
</a> | ||
<a> | ||
<img | ||
alt="npm (latest)" | ||
src="https://img.shields.io/npm/v/theme-ui/latest" | ||
/> | ||
</a> | ||
<a> | ||
<img | ||
alt="npm (develop)" | ||
src="https://img.shields.io/npm/v/theme-ui/develop?color=%23e044aa" | ||
/> | ||
</a> | ||
<a href="https://github.com/system-ui/theme-ui/graphs/contributors"> | ||
<img | ||
src="https://img.shields.io/github/contributors/system-ui/theme-ui" | ||
alt="Contributors" | ||
/> | ||
</a> | ||
<a href="https://github.com/badges/shields/pulse"> | ||
<img | ||
src="https://img.shields.io/github/commit-activity/m/system-ui/theme-ui" | ||
alt="Activity" | ||
/> | ||
</a> | ||
<a href="https://badgen.net/bundlephobia/minzip/theme-ui"> | ||
<img src="https://badgen.net/bundlephobia/minzip/theme-ui" alt="Size" /> | ||
</a> | ||
<a href="https://bundlephobia.com/result?p=theme-ui"> | ||
<img | ||
src="https://badgen.net/bundlephobia/tree-shaking/theme-ui" | ||
alt="Tree Shaking" | ||
/> | ||
</a> | ||
<a href="https://github.com/system-ui/theme-ui/blob/stable/LICENSE.md"> | ||
<img | ||
src="https://badgen.net/badge/license/MIT/blue" | ||
alt="MIT license" | ||
/> | ||
</a> | ||
<a href="https://discord.gg/theme-ui"> | ||
<img | ||
src="https://img.shields.io/discord/778553042466635786?color=%237289da&logo=discord" | ||
alt="Join our Discord community" | ||
/> | ||
</a> | ||
<a href="https://github.com/system-ui/theme-ui/actions?query=workflow%3ACI"> | ||
<img | ||
src="https://github.com/system-ui/theme-ui/workflows/CI/badge.svg?branch=stable" | ||
alt="Build Status" | ||
/> | ||
</a> | ||
<a href="https://dashboard.cypress.io/projects/fmfid1/runs"> | ||
<img | ||
src="https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/fmfid1/stable&logo=cypress" | ||
alt="This project is using Cypress for end-to-end tests." | ||
/> | ||
</a> | ||
<a href="https://percy.io/95212972/theme-ui"> | ||
<img | ||
src="https://percy.io/static/images/percy-badge.svg" | ||
alt="This project is using Percy.io for visual regression testing." | ||
/> | ||
</a> | ||
</div> | ||
) | ||
} |
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,2 @@ | ||
screenshots/* | ||
videos/* |
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,16 @@ | ||
{ | ||
"baseUrl": "http://localhost:9000", | ||
"pluginsFile": "plugins.js", | ||
"supportFile": "support.ts", | ||
"screenshotsFolder": "screenshots", | ||
"videosFolder": "videos", | ||
"downloadsFolder": "downloads", | ||
"fixturesFolder": "fixtures", | ||
"integrationFolder": "integration", | ||
"testFiles": "**/*.*", | ||
"retries": { | ||
"runMode": 1, | ||
"openMode": 3 | ||
}, | ||
"projectId": "fmfid1" | ||
} |
Oops, something went wrong.