-
Notifications
You must be signed in to change notification settings - Fork 673
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
Setup Cypress #1845
Merged
Merged
Setup Cypress #1845
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
55a6ed7
chore: remove Circle CI config
hasparus 1681b0b
ci: add contine-on-error to release CI step, becauseprereleases are f…
hasparus 403f4fb
chore(theme-ui): remove unused build scripts
hasparus 11a7679
test(cypress): add e2e tests for color modes on docs index page
hasparus bd5fe4f
chore: gitignore .envrc.ps1
hasparus a67216f
ci(e2e): add PERCY_TOKEN
hasparus fef3229
chore: exclude packages/e2e from default tsconfig
hasparus f8d572b
ci(e2e): set working-directory
hasparus 4b0316a
ci(e2e): fix start script
hasparus f6854fa
ci(e2e): enable Cypress recording
hasparus e38d064
ci(e2e): use only one container
hasparus 44b7cd0
chore(ci): add GITHUB_TOKEN
hasparus 53ab8f2
chore(ci): stop running push events on ci/ PRs
hasparus 59bd858
chore(ci): use `start` command to run Percy screenshots
hasparus e12c713
chore(ci): fix format string
hasparus 8bb4efe
chore(ci): comment out ci/ branch trigger
hasparus f7fa9d1
chore(ci): provide --record flag
hasparus 935121f
docs(readme): add Percy badge
hasparus 88e2fff
docs(readme): show build status from `stable` branch in the readme
hasparus cb94e1a
chore(ci): remove continue-on-error from release step, as it won't af…
hasparus 1693bf6
docs(readme): add cypress badge
hasparus d60720d
chore(ci): remove Discord badge before screenshot in tests
hasparus 095d02e
chore(e2e): change Percy link to new URL
hasparus 8c17fdc
docs(index): move readme badges *on index page* to a seperate compone…
hasparus 02c5638
chore(e2e): gitignore screenshots and videos
hasparus 701caa2
chore(ci): bump actions/setup-node to v2
hasparus fadff0f
chore(ci): fix line endings
hasparus 7fc4f97
Merge branch 'develop' into ci/cypress
hasparus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it would really help with the tests, but badgen has an alernative showing the number of members (not just online) that potentially change less often?
https://badgen.net/discord/members/theme-ui
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed all of these badges in Cypress test anyway — version numbers change, CI status changes — all the badges are effectively dynamic.