mirror of https://github.com/nextcloud/server
Migrate to npm 7 for autotest-js.sh
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
a7eefa293e
commit
16ba294065
|
@ -28,7 +28,7 @@ jobs:
|
|||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: versions
|
||||
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
@ -60,10 +60,8 @@ jobs:
|
|||
with:
|
||||
node-version: ${{ needs.versions.outputs.nodeVersion }}
|
||||
|
||||
# This test requires npm6 for some reason
|
||||
# TODO: fix this and/or move away from jsunit
|
||||
- name: Set up npm 6
|
||||
run: npm i -g npm@^6
|
||||
- name: Set up npm ${{ needs.versions.outputs.npmVersion }}
|
||||
run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}"
|
||||
|
||||
- name: Test
|
||||
run: ./autotest-js.sh
|
||||
|
@ -71,7 +69,7 @@ jobs:
|
|||
handlebars:
|
||||
runs-on: ubuntu-latest
|
||||
needs: versions
|
||||
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# @copyright 2014 Vincent Petry <pvince81@owncloud.com>
|
||||
#
|
||||
|
||||
# set -e
|
||||
set -euo pipefail
|
||||
|
||||
NPM="$(which npm 2>/dev/null)"
|
||||
PREFIX="build"
|
||||
|
@ -19,19 +19,19 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# update/install test packages
|
||||
mkdir -p "$PREFIX" && $NPM ci --link --prefix "$PREFIX" || exit 3
|
||||
# install test packages
|
||||
mkdir -p "$PREFIX"
|
||||
$NPM ci --prefix "$PREFIX" || exit 3
|
||||
|
||||
# create scss test
|
||||
mkdir -p tests/css
|
||||
for SCSSFILE in core/css/*.scss
|
||||
do
|
||||
FILE=$(basename $SCSSFILE)
|
||||
FILENAME="${FILE%.*}"
|
||||
printf "\$webroot:''; @import 'functions.scss'; @import 'variables.scss'; @import '${FILE}';" | ./build/bin/node-sass --include-path core/css/ > tests/css/${FILE}.css
|
||||
printf "\$webroot:''; @import 'functions.scss'; @import 'variables.scss'; @import '${FILE}';" | ./build/node_modules/.bin/node-sass --include-path core/css/ > tests/css/${FILE}.css
|
||||
done
|
||||
|
||||
KARMA="$PREFIX/node_modules/karma/bin/karma"
|
||||
|
||||
NODE_PATH='build/node_modules' KARMA_TESTSUITE="$1" $KARMA start tests/karma.config.js --single-run
|
||||
NODE_PATH='build/node_modules' KARMA_TESTSUITE="${1:-}" $KARMA start tests/karma.config.js --single-run
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -26,7 +26,10 @@
|
|||
"sinon": "<= 5.0.7"
|
||||
},
|
||||
"overrides": {
|
||||
"colors": "1.4.0"
|
||||
"colors": "1.4.0"
|
||||
},
|
||||
"engine": "node >= 6.9"
|
||||
}
|
||||
"engines": {
|
||||
"node": "^14.0.0",
|
||||
"npm": "^7.0.0"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue