Skip to content

Commit

Permalink
chore: #116 #117 update ts-definition pipeline, scripts (#226)
Browse files Browse the repository at this point in the history
* chore: #116 #117 update ts-definition pipeline, scripts

* chore: lock version of package "foundation-ts-definition" for all apps. update PR comment

* fix

* update elements package to include foundation definition

* remove password param from test
  • Loading branch information
NghiaPham authored Feb 13, 2020
1 parent 99d98ea commit a97fc45
Show file tree
Hide file tree
Showing 40 changed files with 326 additions and 10,897 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/foundation-ts-definition-cronjob.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Check for Typescript definition update

on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 1-31 * *'

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: checks out repository to $GITHUB_WORKSPACE
uses: actions/checkout@v1

- name: Setup Node Environement
uses: actions/setup-node@v1
with:
node-version: 12

- name: Cache node modules
id: cache
uses: actions/cache@v1
with:
path: node_modules
key: build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
build-${{ hashFiles('**/yarn.lock') }}
- name: Integrate Git credential
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Install dependencies
run: yarn install

- name: Fetch latest definition
run: yarn workspace @reapit/foundations-ts-definitions fetch-definition

- name: If definition is changed then bump minor npm package, publish and push commit to master
run: yarn workspace @reapit/foundations-ts-definitions handle-cron-job

env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release production
on:
push:
tags:
- '*'
- '*'

env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ elements/public
out*
package-lock.json
.env
invite-developers.js
invite-developers.js
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
1 change: 1 addition & 0 deletions packages/aml-checklist/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
5 changes: 3 additions & 2 deletions packages/aml-checklist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"release:prod": "node ../../scripts/release/release-prod.js aml-checklist reapit-aml-checklist-prod",
"test:update-badges": "yarn test:ci && jest-coverage-badges --input src/tests/coverage/coverage-summary.json --output src/tests/badges"
},
"dependencies": {},
"devDependencies": {}
"devDependencies": {
"@reapit/foundations-ts-definitions": "2020-02-13"
}
}
1 change: 0 additions & 1 deletion packages/aml-checklist/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"@/*": ["src/*"],
"@reapit/cognito-auth": ["../cognito-auth/src"],
"@reapit/elements": ["../elements/src"],
"@reapit/foundations-ts-definitions": ["./src/types/api-2020-01-31"],
"logger": ["../../scripts/logger/sentry-logger.ts"]
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/elements/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
4 changes: 3 additions & 1 deletion packages/elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
"react-table": "7.0.0-alpha.35",
"styled-components": "^4.4.1"
},
"devDependencies": {},
"devDependencies": {
"@reapit/foundations-ts-definitions": "2020-02-13"
},
"peerDependencies": {
"react": "^16.11.0",
"react-dom": "^16.11.0",
Expand Down
1 change: 1 addition & 0 deletions packages/foundations-ts-definitions/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
21 changes: 9 additions & 12 deletions packages/foundations-ts-definitions/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
{
"name": "@reapit/foundations-ts-definitions",
"version": "0.0.18",
"version": "0.0.38",
"license": "MIT",
"files": [
"types/*"
],
"main": "./types/index.ts",
"peerDependencies": {
},
"license": "MIT",
"scripts": {
"fetch:platform": "node './scripts/fetch-platform-definition.js'",
"fetch:marketPlace": "node './scripts/fetch-marketplace-definition.js'",
"fetch:definition": "rimraf types && mkdir types && yarn fetch:platform && yarn fetch:marketPlace && yarn create-index-file",
"create-index-file": "node './scripts/create-index-file.js'",
"handle-cronjob": "node ./scripts/handle-cronjob.js"
},
"dependencies": {
"release:prod": "node ../../scripts/foundations-ts-definitions/release-npm.js foundations-ts-definitions",
"fetch-definition": "node '../../scripts/foundations-ts-definitions/fetch-definition.js'",
"handle-cron-job": "node '../../scripts/foundations-ts-definitions/handle-cronjob.js'",
"test:update-badges": "echo 'not implmented'"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
"prettier --write",
"git add"
]
}
},
"dependencies": {},
"peerDependencies": {}
}
15 changes: 0 additions & 15 deletions packages/foundations-ts-definitions/scripts/check-version.js

This file was deleted.

18 changes: 0 additions & 18 deletions packages/foundations-ts-definitions/scripts/create-index-file.js

This file was deleted.

40 changes: 0 additions & 40 deletions packages/foundations-ts-definitions/scripts/release-master.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/foundations-ts-definitions/types/index.ts

This file was deleted.

Loading

0 comments on commit a97fc45

Please sign in to comment.