Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Simplify test-and-fix script for build-dev workflow #5568

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- run: npm run log:test-and-fix
env:
FIX_MOST_SKIP: i18n|refcache|submodule
CMD_SKIP: i18n
PIN_SKIP: ${{ inputs.submodule_path_regex }}

- uses: actions/upload-artifact@v4
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@
"_diff:fail": "git diff --name-only --exit-code || exit 1",
"_fail": "exit 1",
"_filename-error": "echo 'ERROR: the following files violate naming conventions; fix using: `npm run fix:filenames`'; echo; npm run -s _ls-bad-filenames; exit 1",
"_fix:most": "npm run seq -- $(npm -s run _list:fix:* | grep -Ev \"${FIX_MOST_SKIP:-refcache|submodule}\")",
"_get:no": "echo SKIPPING get operation",
"_get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 999}",
"_hugo": "hugo --cleanDestinationDir",
"_install:dict": "npm install -D $(npm run -s _list:dict)",
"_install:netlify-cli": "npm list netlify-cli || npm install -O netlify-cli",
"_list:check:*": "npm run --loglevel=warn | grep -Ee '^\\s*check:[^:]+$'",
"_list:check:for-test-and-fix": "npm -s run _list:check:* | grep -Ev \"${CMD_SKIP:-noop}\"",
"_list:dict": "grep '^\\s*\"@cspell' package.json | awk -F: '{print $1}' | tr -d '\"'",
"_list:fix:*": "npm run --loglevel=warn | grep -Ee '^\\s*fix:[^:]+$' | grep -v 'fix:all'",
"_list:fix:for-test-and-fix": "npm -s run _list:fix:* | grep -Ev \"refcache|submodule|${CMD_SKIP:-noop}\"",
"_ls-bad-filenames": "find assets content static -name '*_*' ! -name '[_.]*'",
"_pin:submodule": "scripts/pin-submodules.pl",
"_prebuild": "npm run seq -- get:submodule cp:spec",
Expand Down Expand Up @@ -97,7 +98,7 @@
"serve:hugo": "npm run _serve:hugo -- --renderToMemory",
"serve:netlify": "npm run _serve:netlify",
"serve": "npm run serve:hugo --",
"test-and-fix": "npm run seq -- fix:submodule _fix:most test",
"test-and-fix": "npm run seq -- fix:submodule $(npm -s run _list:fix:for-test-and-fix) $(npm -s run _list:check:for-test-and-fix)",
"test": "npm run check",
"update:htmltest-config": "scripts/htmltest-config.sh",
"update:pkg:hugo": "npm install --save-dev --save-exact hugo-extended@latest",
Expand Down