mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-27 02:51:00 +00:00
change node version to 20.x (#6514)
This commit is contained in:
parent
9478d4637d
commit
1eda94917b
2
.github/workflows/dist.yml
vendored
2
.github/workflows/dist.yml
vendored
@ -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: |
|
||||
|
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@ -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
|
||||
|
@ -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
|
||||
|
26
tests/test_frontend_changes.sh
Normal file
26
tests/test_frontend_changes.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user