Skip to content

Commit 7e4bcb2

Browse files
committed
Set up Cypress GH action
1 parent bcd4c20 commit 7e4bcb2

File tree

7 files changed

+37116
-12
lines changed

7 files changed

+37116
-12
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,31 @@ jobs:
1818
# This workflow contains a single job called "build"
1919
build:
2020
# The type of runner that the job will run on
21-
runs-on: macos-latest
21+
runs-on: ubuntu-latest
2222

2323
# Steps represent a sequence of tasks that will be executed as part of the job
2424
steps:
2525
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2626
- uses: actions/checkout@v2
2727

28-
- name: Setup servers
29-
run : |
30-
(cd server && npm install)
31-
(cd app/listings && npm install)
28+
- name: Install server npm packages
29+
uses: bahmutov/npm-install@v1
30+
with:
31+
working-directory: server
32+
33+
- name: Install app/listings npm packages
34+
uses: bahmutov/npm-install@v1
35+
with:
36+
working-directory: app/listings
37+
38+
- name: Start server in the background
39+
run: (cd server && npm start &)
40+
41+
- name: Start React app in the background
42+
run: (cd app/listings && npm start &)
3243

33-
- uses: cypress-io/github-action@v2
44+
- name: Install Cypress and run tests
45+
uses: cypress-io/github-action@v2
3446
with:
35-
start: npm start &
36-
wait-on: 'http://localhost:3000'
3747
working-directory: app/listings
3848

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules
2-
package-lock.json
32
yarn.lock
43
config.env

0 commit comments

Comments
 (0)