Skip to content

Commit

Permalink
feat: add ci with cypress run for both web apps
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorVelarde committed Feb 8, 2021
1 parent 87db5c1 commit 44f4ee4
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: CI

on: [push]

jobs:
test-sample-app:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: cd template-sample-app/template
- run: cp package.dev.json package.json
- run: npm install -g yarn
- run: yarn
- run: yarn lint
- run: yarn build
- run: yarn cy:ci
env:
CI: true

test-skeleton-app:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: cd template-skeleton/template
- run: cp package.dev.json package.json
- run: npm install -g yarn
- run: yarn
- run: yarn lint
- run: yarn build
- run: yarn cy:ci
env:
CI: true
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ firebase-debug.log*
firebase-debug.*.log*

# Firebase cache
.firebase/
.firebase/
template-sample-app/template/cypress/videos/config.js.mp4
template-sample-app/template/cypress/videos/home_page_spec.js.mp4
template-sample-app/template/cypress/videos/kpi_page_spec.js.mp4
3 changes: 3 additions & 0 deletions template-sample-app/template/package.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-prettier": "^3.3.1",
"firebase-tools": "^9.2.2",
"start-server-and-test": "^1.12.0",
"husky": "^4.3.8",
"hygen": "^6.0.4",
"lint-staged": "^10.5.3",
Expand All @@ -45,6 +46,8 @@
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"cypress": "npx cypress open",
"cy:run": "npx cypress run",
"cy:ci": "START_SERVER_AND_TEST_INSECURE=1 start-server-and-test start https-get://localhost:3000 cy:run",
"eject": "react-scripts eject",
"lint": "eslint './src/**/*.{js,jsx}'",
"lint:fix": "eslint './src/**/*.{js,jsx}' --fix",
Expand Down
3 changes: 3 additions & 0 deletions template-skeleton/template/package.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-prettier": "^3.3.1",
"firebase-tools": "^9.2.2",
"start-server-and-test": "^1.12.0",
"husky": "^4.3.8",
"hygen": "^6.0.4",
"lint-staged": "^10.5.3",
Expand All @@ -45,6 +46,8 @@
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"cypress": "npx cypress open",
"cy:run": "npx cypress run",
"cy:ci": "START_SERVER_AND_TEST_INSECURE=1 start-server-and-test start https-get://localhost:3000 cy:run",
"eject": "react-scripts eject",
"lint": "eslint './src/**/*.{js,jsx}'",
"lint:fix": "eslint './src/**/*.{js,jsx}' --fix",
Expand Down

0 comments on commit 44f4ee4

Please sign in to comment.