Skip to content

Commit

Permalink
[CI] Simplify test-and-fix script for build-dev workflow (#5568)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Nov 8, 2024
1 parent fc10be9 commit fc038bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit fc038bf

Please sign in to comment.