Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

build: add support for node 16 #1291

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/scripts/testing.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
if [[ $NODE == 16 ]]
then
export NODE_VERSION=16.14.0
else
export NODE_VERSION=12.11.1
fi

docker exec -t insights_testing bash -c "
cd /edx/app/insights/edx_analytics_dashboard/ &&
source /edx/app/insights/venvs/insights/bin/activate &&
PATH=\$PATH:/edx/app/insights/nodeenvs/insights/bin:/snap/bin &&
export TOXENV=django32 &&
pip install -r requirements/github.txt &&
set -x &&
rm -rf /edx/app/insights/nodeenvs/insights-test-${NODE} &&
nodeenv --node=${NODE_VERSION} /edx/app/insights/nodeenvs/insights-test-${NODE} &&
source /edx/app/insights/nodeenvs/insights-test-${NODE}/bin/activate &&
node --version && npm --version
make $TARGETS
"
"
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
strategy:
matrix:
python-version: ["3.8"]
node: [12, 16]
os: [ubuntu-20.04]
toxenv: [django32]
env:
Expand Down Expand Up @@ -47,6 +48,7 @@ jobs:
shell: bash
env:
TESTNAME: js
NODE: ${{ matrix.node }}
TARGETS: "requirements.js validate_js"
- name: test i18n
run: ./.github/scripts/testing.sh
Expand All @@ -59,12 +61,14 @@ jobs:
shell: bash
env:
TESTNAME: acceptance
NODE: ${{ matrix.node }}
TARGETS: "requirements.a11y migrate requirements.js static accept"
- name: test python
run: ./.github/scripts/testing.sh
shell: bash
env:
TESTNAME: test-python
NODE: ${{ matrix.node }}
TARGETS: "requirements.js static test_python"
- name: code cov
run: codecov --disable pycov
3 changes: 2 additions & 1 deletion npm-post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ done
# pre-compile the pattern library to improve sass compilation performance
if [ ! -f ${PATTERN_LIBRARY_SASS_PATH}/edx-pattern-library-ltr-compiled.scss ]; then
echo "Pre-compiling edX pattern library..."
${NPM_BIN}/node-sass ${PATTERN_LIBRARY_SASS_PATH}/edx-pattern-library-ltr.scss ${PATTERN_LIBRARY_SASS_PATH}/edx-pattern-library-ltr-compiled.scss
${NPM_BIN}/sass ${PATTERN_LIBRARY_SASS_PATH}/edx-pattern-library-ltr.scss
${NPM_BIN}/sass ${PATTERN_LIBRARY_SASS_PATH}/edx-pattern-library-ltr-compiled.scss
echo "Done compiling."
else
echo "edX pattern library already compiled."
Expand Down
Loading