Skip to content

Commit

Permalink
feat(load-test): add pre-commit hook to convert typescript to javascr…
Browse files Browse the repository at this point in the history
…ipt for k6
  • Loading branch information
canzhen committed Apr 17, 2024
1 parent 6e945a7 commit dcdcabb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- uses: open-turo/actions-release/release-notes-preview@v2
- uses: open-turo/actions-release/lint-release-notes@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
Expand Down
9 changes: 9 additions & 0 deletions hooks/javascript/load-test-convert-ts-to-js.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This should be used by load-test only,

currentBranch=$(git rev-parse --abbrev-ref HEAD)

if git diff-tree --no-commit-id --name-only -r HEAD..origin/$currentBranch | grep -q 'load-test/'; then
echo 'hahahha!'
cd load-test
npm run bundle
fi

0 comments on commit dcdcabb

Please sign in to comment.