Skip to content

Commit

Permalink
chore: 馃敡 added npm test to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Can-Sahin committed May 5, 2020
1 parent aa890c5 commit 1fbf852
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- run: npm run test:generators
- run: npm run lint
- run: npm run checkTs
- run: npm run test
- run: npm run cleanExampleApp
- run: npm run build
- run: npm run test:generators
Expand Down
3 changes: 2 additions & 1 deletion internals/scripts/create-npm-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ export function createNpmPackage(opts: Options = {}) {

crateTemplateFolder(opts);

shell.exec(`npm pack`);
shell.exec(`npm pack`, { silent: true });
shell.exec(
`tar -xvf ${packageName}-${packageVersion}.tgz && mv package ${packageFolder} && rm ${packageName}-${packageVersion}.tgz`,
{ silent: true },
);

removeTemplateFolder();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"// ---TESTING TEMPLATE---": "",
"test:all": "npm run test -- --watchAll=false",
"test:coverage": "npm run test:all -- --coverage",
"test:cra": "npm run create:cra-app && cd generated-cra-app && npm run test:generators && npm run lint && npm run checkTs && npm run cleanExampleApp && npm run lint && npm run checkTs",
"test:cra": "npm run create:cra-app && cd generated-cra-app && npm run test:generators && npm run lint && npm run checkTs && npm run test && npm run cleanExampleApp && npm run lint && npm run checkTs",
"// ---BUILDING TEMPLATE---": "",
"create:npm-package": "ts-node --project=./internals/ts-node.tsconfig.json ./internals/scripts/create-npm-package.script.ts",
"create:cra-app": "rm -rf generated-cra-app && npm run create:npm-package && npx create-react-app generated-cra-app --template file:.cra-template-rb && rm -rf .cra-template-rb",
Expand Down

0 comments on commit 1fbf852

Please sign in to comment.