Skip to content

Commit

Permalink
ci fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ace Ci Bot authored and nightwing committed Mar 31, 2024
1 parent 076d177 commit d3fde97
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,26 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm run cover
# run linter
- run: |
set -x;
git status;
git checkout HEAD -- package.json;
changes=$(git diff --name-only origin/HEAD --no-renames --diff-filter=ACMR);
if [ "$changes" == "" ]; then
echo "checking all files";
node node_modules/eslint/bin/eslint "lib/ace/**/*.js";
node node_modules/eslint/bin/eslint --fix "lib/ace/**/*.js";
else
jsChanges=$(echo "$changes" | grep -P '.js$' || :);
if [ "$jsChanges" == "" ]; then
echo "nothing to check";
else
echo "checking $jsChanges";
node node_modules/eslint/bin/eslint $jsChanges;
node node_modules/eslint/bin/eslint --fix $jsChanges;
fi
fi
# - run: npm run lint
# check types
- run: npm run update-types
- run: node_modules/.bin/tsc --noImplicitAny --strict --noUnusedLocals --noImplicitReturns --noUnusedParameters --noImplicitThis ace.d.ts
- run: npm run typecheck
- uses: codecov/codecov-action@v3
Expand All @@ -60,3 +62,21 @@ jobs:
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
# push automatic fixes to the pull request
- run: |
set -x;
git status;
git add -u
git reset -- build
git config user.name "Ace Ci Bot"
git config user.email "bot@c9.io"
git commit -m "ci fixes" --author="Ace Ci Bot <bot@c9.io>"
git branch -F CI_FIXES
git remote -v
git log --all --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
# git push origin
- run: gh pr checkout ${{ github.event.pull_request.number }}
- run: git cherry-pick CI_FIXES
- run: git push
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"lint": "eslint \"src/**/*.js\"",
"fix": "eslint --fix \"src/**/*.js\"",
"typecheck": "tsc -p tsconfig.json",
"update-types": "node ./tool/modes-declaration-generator.js",
"changelog": "standard-version",
"prepack": "node tool/esm_resolver_generator.js && node Makefile.dryice.js css --target build-styles && rm -rf styles && mv build-styles/css styles"
},
Expand Down
2 changes: 1 addition & 1 deletion src/keyboard/hash_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,4 @@ MultiHashHandler.call = function(thisArg, config, platform) {
};

exports.HashHandler = HashHandler;
exports.MultiHashHandler = MultiHashHandler;
exports.MultiHashHandler = MultiHashHandler

0 comments on commit d3fde97

Please sign in to comment.