1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 19:05:16 +00:00

change node version to 20.x (#6514)

This commit is contained in:
Michael An 2024-08-09 12:33:44 +08:00 committed by GitHub
parent 9478d4637d
commit 1eda94917b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 29 additions and 15 deletions

View File

@ -21,7 +21,7 @@ jobs:
python-version: "3.8"
- uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: "20.x"
- name: gettext for django
run: |

View File

@ -10,11 +10,6 @@ env:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
@ -51,10 +46,9 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: "20.x"
- name: run npm lint
run: |
cd $GITHUB_WORKSPACE/tests/
chmod +x github_actions_npm_lint.sh
./github_actions_npm_lint.sh
if chmod +x test_frontend_changes.sh && ./test_frontend_changes.sh; then chmod +x github_actions_npm_lint.sh && ./github_actions_npm_lint.sh; else true; fi

View File

@ -11,16 +11,10 @@ fi
export GITHUB_BRANCH=$branch
echo "GITHUB_BRANCH: $GITHUB_BRANCH"
export PYTHONPATH="${PYTHONPATH}:/tmp/site-packages"
echo "PYTHONPATH: $PYTHONPATH"
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >~/.npmrc
cd $GITHUB_WORKSPACE
echo "npm run lint on frontend/src files..."
cd ./frontend && npm install && npm run lint

View File

@ -0,0 +1,26 @@
#!/bin/bash
check_path_fn()
{
FN=$1
shift
patt="frontend*"
[[ $FN == $patt ]] && return 1
return 0
}
FILES=`git diff --name-only HEAD~`
for i in $FILES
do
check_path_fn $i
retval=$?
if [ "$retval" == 1 ]; then
echo "File changes need to trigger tests."
exit 0
fi
done
exit 1