-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -60,3 +62,16 @@ 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 "John Doe" | ||
git config user.email "[email protected]" | ||
git commit -m "ci fixes" --author="Ace Ci Bot <[email protected]>" | ||
git branch | ||
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters