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

Commit

Permalink
build: add support for node 16 (#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsobanjaved authored Apr 20, 2022
1 parent 9eca2ed commit bb7ec18
Show file tree
Hide file tree
Showing 17 changed files with 10,750 additions and 14,318 deletions.
2 changes: 1 addition & 1 deletion .es6-eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": true,
"plugins": ["syntax-dynamic-import"]
"plugins": ["@babel/plugin-syntax-dynamic-import"]
},
"plugins": [
"import"
Expand Down
19 changes: 19 additions & 0 deletions .github/scripts/testing-js.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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 &&
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
"
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
python-version: ["3.8"]
os: [ubuntu-20.04]
toxenv: [django32]
node: [12, 16]
env:
DATA_API_VERSION: "latest"
steps:
Expand Down Expand Up @@ -43,10 +44,11 @@ jobs:
TESTNAME: quality
TARGETS: "quality"
- name: test js
run: ./.github/scripts/testing.sh
run: ./.github/scripts/testing-js.sh
shell: bash
env:
TESTNAME: js
NODE: ${{ matrix.node }}
TARGETS: "requirements.js validate_js"
- name: test i18n
run: ./.github/scripts/testing.sh
Expand All @@ -55,16 +57,18 @@ jobs:
TESTNAME: test-i18n
TARGETS: "generate_fake_translations"
- name: test acceptance
run: ./.github/scripts/testing.sh
run: ./.github/scripts/testing-js.sh
shell: bash
env:
TESTNAME: acceptance
NODE: ${{ matrix.node }}
TARGETS: "requirements.a11y migrate requirements.js static accept"
- name: test python
run: ./.github/scripts/testing.sh
run: ./.github/scripts/testing-js.sh
shell: bash
env:
TESTNAME: test-python
NODE: ${{ matrix.node }}
TARGETS: "requirements.js static test_python"
- name: code cov
run: codecov --disable pycov
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ compile_translations: # compiles djangojs and django .po and .mo files
$(TOX)python manage.py compilemessages

extract_translations: ## extract strings to be translated, outputting .mo files
$(TOX)python manage.py makemessages -l en -v1 --ignore="docs/*" --ignore="src/*" --ignore="i18n/*" --ignore="assets/*" --ignore="static/bundles/*" -d django
$(TOX)python manage.py makemessages -l en -v1 --ignore="docs/*" --ignore="src/*" --ignore="i18n/*" --ignore="assets/*" --ignore="static/bundles/*" -d djangojs
$(TOX)python manage.py makemessages -l en -v1 --ignore="docs/*" --ignore="src/*" --ignore="i18n/*" --ignore="assets/*" --ignore="static/bundles/*" --ignore="node_modules/*" -d django
$(TOX)python manage.py makemessages -l en -v1 --ignore="docs/*" --ignore="src/*" --ignore="i18n/*" --ignore="assets/*" --ignore="static/bundles/*" --ignore="node_modules/*" -d djangojs

dummy_translations: ## generate dummy translation (.po) files
cd analytics_dashboard && i18n_tool dummy
Expand Down
Binary file modified analytics_dashboard/conf/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit bb7ec18

Please sign in to comment.