Skip to content

Commit

Permalink
Merge pull request #43 from wednesday-solutions/fix/scripts
Browse files Browse the repository at this point in the history
Fix scripts
  • Loading branch information
praveenkumar1798 authored May 9, 2023
2 parents 7e6f0e5 + 525a345 commit 9bb9576
Show file tree
Hide file tree
Showing 5 changed files with 318 additions and 252 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,25 @@ on:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]

steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
run: yarn

- name: Build
run: yarn build
run: yarn build:prod

- name: Deploy to S3
uses: jakejarvis/s3-sync-action@master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -27,7 +27,7 @@ jobs:
run: yarn test

- name: Build
run: yarn build
run: yarn build:prod

# - name: SonarCloud Scan
# uses: sonarsource/sonarcloud-github-action@master
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/jest-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,25 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Get Threshold
id: threshold
uses: notiz-dev/github-action-json-property@release
with:
path: 'jest.config.json'
prop_path: 'coverageThreshold.global.statements'

- name: Install dependencies
run: yarn

- name: Test and generate coverage report
uses: artiomtr/[email protected]
with:
Expand Down
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"engines": {
"npm": ">=5",
"node": ">=8.15.1"
"node": ">=8.15.1 <17.9.1"
},
"author": "Mac",
"homepage": "https://github.com/wednesday-solutions/react-graphql-ts-template",
Expand All @@ -20,15 +20,13 @@
"extract-intl": "node ./internals/scripts/extract-intl.js",
"npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
"preinstall": "npm run npmcheckversion",
"prebuild": "npm run build:clean",
"build": "export NODE_OPTIONS=--openssl-legacy-provider && export ENVIRONMENT_NAME=production && cross-env NODE_ENV=production webpack --config internals/webpack/webpack.config.prod.js --color --progress --stats-children --stats-error-details",
"build:dev": "export NODE_OPTIONS=--openssl-legacy-provider && export ENVIRONMENT_NAME=development && cross-env NODE_ENV=production webpack --config internals/webpack/webpack.config.dev.js --color --progress",
"prebuild:prod": "npm run build:clean",
"build:prod": "export ENVIRONMENT_NAME=production && cross-env NODE_ENV=production webpack --config internals/webpack/webpack.config.prod.js --color --progress --stats-children --stats-error-details",
"build:dev": "export ENVIRONMENT_NAME=development && cross-env NODE_ENV=production webpack --config internals/webpack/webpack.config.dev.js --color --progress",
"build:clean": "rimraf ./build",
"predeploy": "yarn build && yarn build-storybook -o build/stories",
"deploy": "gh-pages -d build",
"start": "export NODE_OPTIONS=--openssl-legacy-provider && export ENVIRONMENT_NAME=local && concurrently -c green.bold,blue.bold -n WEBPACK,TYPESCRIPT \"cross-env NODE_ENV=development node server\" \"yarn tsc:watch\"",
"start": "export ENVIRONMENT_NAME=local && concurrently -c green.bold,blue.bold -n WEBPACK,TYPESCRIPT \"cross-env NODE_ENV=development node server\" \"yarn tsc:watch\"",
"start:tunnel": "cross-env NODE_ENV=development ENABLE_TUNNEL=true node server",
"start:production": "npm run test && npm run build && npm run start:prod",
"start:production": "npm run test && npm run build:prod && npm run start:prod",
"start:prod": "cross-env NODE_ENV=production node server",
"presetup": "npm i chalk shelljs",
"setup": "node ./internals/scripts/setup.js",
Expand Down Expand Up @@ -196,7 +194,6 @@
"eslint-plugin-redux-saga": "1.1.3",
"eslint-plugin-standard": "4.0.1",
"file-loader": "6.2.0",
"gh-pages": "^3.2.3",
"html-loader": "2.1.2",
"html-webpack-plugin": "5.3.2",
"image-webpack-loader": "7.0.1",
Expand Down
Loading

0 comments on commit 9bb9576

Please sign in to comment.