Browse Source

Migrate to npm 7 for autotest-js.sh

Signed-off-by: Louis Chemineau <louis@chmn.me>
tags/v24.0.0beta1
Louis Chemineau 2 years ago
parent
commit
16ba294065
4 changed files with 1704 additions and 782 deletions
  1. 4
    6
      .github/workflows/node-tests.yml
  2. 6
    6
      autotest-js.sh
  3. 1688
    767
      build/package-lock.json
  4. 6
    3
      build/package.json

+ 4
- 6
.github/workflows/node-tests.yml View File

@@ -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

+ 6
- 6
autotest-js.sh View File

@@ -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


+ 1688
- 767
build/package-lock.json
File diff suppressed because it is too large
View File


+ 6
- 3
build/package.json View File

@@ -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…
Cancel
Save