Skip to content

Commit

Permalink
Run @arethetypeswrong/cli in CI + before publish (#493)
Browse files Browse the repository at this point in the history
* Run @arethetypeswrong/cli in CI + before publish

* Simplify build/test stages
  • Loading branch information
fruchtose-stripe committed Apr 12, 2024
1 parent d656027 commit 0d6b2e2
Show file tree
Hide file tree
Showing 4 changed files with 254 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ jobs:
- run: yarn run typecheck
- run: yarn run test:unit
- run: yarn run build
- run: yarn run test:package-types
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"browser": "dist/react-stripe.umd.js",
"types": "dist/react-stripe.d.ts",
"scripts": {
"test": "yarn run lint && yarn run lint:prettier && yarn run test:unit && yarn run typecheck",
"test": "yarn run lint && yarn run lint:prettier && yarn run test:unit && yarn test:package-types && yarn run typecheck",
"test:package-types": "attw --pack .",
"test:unit": "jest",
"lint": "eslint --max-warnings=0 '{src,examples}/**/*.{ts,tsx,js}'",
"lint:prettier": "prettier './**/*.js' './**/*.ts' './**/*.tsx' './**/*.css' './**/*.md' --list-different",
Expand Down Expand Up @@ -57,6 +58,7 @@
"prop-types": "^15.7.2"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@babel/cli": "^7.7.0",
"@babel/core": "^7.7.2",
"@babel/preset-env": "^7.7.1",
Expand Down
6 changes: 3 additions & 3 deletions scripts/publish
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ fi
echo "Installing dependencies according to lockfile"
yarn -s install --frozen-lockfile

echo "Building"
yarn -s run build

echo "Running tests"
yarn -s run test

Expand All @@ -191,9 +194,6 @@ verify_commit_is_signed
echo "Pushing git commit and tag"
git push --follow-tags

echo "Building"
yarn -s run build

echo "Publishing release"
yarn --ignore-scripts publish --non-interactive --access=public

Expand Down
Loading

0 comments on commit 0d6b2e2

Please sign in to comment.