Skip to content

Commit

Permalink
cleanup and cache
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSp committed May 4, 2022
1 parent 58fbe63 commit 48b1eb1
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 245 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,28 @@ jobs:
uses: actions/setup-node@v3.1.1
with:
node-version: 16.x
cache: 'npm'

- name: Install dependencies
run: npm ci

run: |
npm ci
sudo apt-get update && sudo apt-get install dos2unix
- name: test
run: npm run test
- name: Rebuild the dist/ directory
run: |
npm run build
npm run package
- name: Compare the expected and actual dist/ directories
id: diff
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
git status --porcelain=v1
if [ "$(git status --porcelain=v1 2>/dev/null | wc -l | sed 's# ##g')" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
git diff --text
exit 1
fi
id: diff
# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v3
Expand Down
97 changes: 0 additions & 97 deletions dist/estimate.js

This file was deleted.

38 changes: 0 additions & 38 deletions dist/estimate.test.js

This file was deleted.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

94 changes: 0 additions & 94 deletions dist/main.js

This file was deleted.

2 changes: 0 additions & 2 deletions dist/types.js

This file was deleted.

30 changes: 26 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript-action",
"version": "0.0.0",
"name": "jira-estimates",
"version": "v1",
"private": true,
"description": "TypeScript template action",
"main": "lib/main.js",
Expand All @@ -9,7 +9,7 @@
"format": "prettier --write '**/*.ts'",
"format-check": "prettier --check '**/*.ts'",
"lint": "eslint src/**/*.ts",
"package": "ncc build --source-map --license licenses.txt",
"package": "ncc build --source-map --license licenses.txt && dos2unix dist/*",
"test": "jest",
"all": "npm run build && npm run format && npm run lint && npm run package && npm test"
},
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
}
},
"exclude": ["**/*.test.ts"]
}

0 comments on commit 48b1eb1

Please sign in to comment.