Skip to content

Commit 3587bcb

Browse files
authored
Merge pull request #77 from wally-yawn/add_cypress_workflows
Add workflows
2 parents c4a1b3e + c5b56c2 commit 3587bcb

5 files changed

Lines changed: 48 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
cypress-run:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
13+
- name: Use Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: 18
17+
18+
- name: Install dependencies
19+
run: npm ci
20+
21+
- name: Run Cypress tests
22+
uses: cypress-io/github-action@v6
23+
with:
24+
start: npm start
25+
wait-on: 'http://localhost:3001'
26+
wait-on-timeout: 90

package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"web-vitals": "^4.2.4"
1414
},
1515
"scripts": {
16-
"start": "react-scripts start",
16+
"start": "cross-env PORT=3001 react-scripts start",
1717
"build": "react-scripts build",
1818
"test": "react-scripts test",
1919
"eject": "react-scripts eject",
@@ -38,6 +38,7 @@
3838
]
3939
},
4040
"devDependencies": {
41+
"cross-env": "^7.0.3",
4142
"cypress": "^13.17.0"
4243
}
4344
}

src/App.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import logo from "./logo.svg";
21
import "./App.css";
32
import GardenInput from "./GardenInput/GardenInput";
43
import Header from "./Header/Header";

src/GardenInput/GardenInput.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import "./GardenInput.css";
22
import React, { useState, useEffect } from "react";
3-
import BASE_URL from '../config/config';
43
import config from '../config/config';
54
import { Tooltip } from "react-tooltip";
65

0 commit comments

Comments
 (0)