Skip to content

Commit

Permalink
Update cypress and node dependencies (#309)
Browse files Browse the repository at this point in the history
* Update cypress and node dependencies

* Update cypress file

* Update nvmrc

* Tweak run settings
  • Loading branch information
lizadaly authored Jan 20, 2023
1 parent e4bc833 commit 8fc3b0a
Show file tree
Hide file tree
Showing 15 changed files with 27,872 additions and 1,534 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,16 @@ on: [pull_request]
jobs:
cypress-run:
runs-on: ubuntu-latest
container: cypress/browsers:node14.17.0-chrome91-ff89
container: cypress/browsers:node18.12.0-chrome106-ff106
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Cache Next artifacts
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
uses: actions/checkout@v3

- name: Cypress run
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v5
with:
start: npm run start
# quote the url to be safe against YML parsing surprises
wait-on: 'http://localhost:3000/manual'
quiet: true
browser: chrome
headless: true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.16.0
18.13.0
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Stories demonstrating use of Windrift 2 from the basic to the advanced are avail
To ensure you're using a fully-compatible version of Node, use [Node Version Manager](https://github.com/nvm-sh/nvm). Follow its installation process for your platform and then run:

```
nvm install 14
nvm use 14
nvm install 18
nvm use 18
```

Then to install Windrift:
Expand All @@ -35,8 +35,6 @@ Then to install Windrift:
npm install
```

(Windrift comes ready to deploy using Vercel, which requires a maximum Node version of 14. If you're deploying elsewhere you could use a Node version greater than 14.)

### To start a new story

```
Expand Down
15 changes: 15 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from 'cypress'

export default defineConfig({
retries: {
runMode: 2,
},
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'http://localhost:3000',
},
})
6 changes: 0 additions & 6 deletions cypress.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 8fc3b0a

Please sign in to comment.