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

feat: upgraded to node v18, added .nvmrc and updated workflows #1431

Draft
wants to merge 45 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0227fd4
feat: upgraded to node v18, added .nvmrc and updated workflows
Mar 22, 2023
b471e94
chore: update workflow
Mar 22, 2023
a03c8ee
refactor: update lock file
Mar 27, 2023
60b9dde
refactor: update eslint
Mar 27, 2023
9320138
refactor: update eslint
Mar 27, 2023
b23bcea
refactor: update eslint
Mar 27, 2023
be4ffd2
refactor: update testing js file
Mar 27, 2023
507aeef
refactor: update testing js file
Mar 28, 2023
f3c8e7c
refactor: update ci file
Mar 28, 2023
2fef613
refactor: update ci file
Mar 28, 2023
03c11bc
refactor: update docker compose file
Mar 28, 2023
92aeba5
refactor: update lock file and nvmc
Mar 28, 2023
77b5b42
refactor: update lock file and install pkg
Mar 28, 2023
abda835
refactor: update lock file and install pkg
Mar 28, 2023
8aa27eb
build: upgrade edx-pattern-library verion
Mar 29, 2023
2167bd4
build: upgrade edx-pattern-library verion
Mar 29, 2023
9f30f6e
build: upgrade eslint config
Mar 29, 2023
f3c06ff
build: change eslint-config version and update tesing-js file
Mar 29, 2023
d9b6742
refactor: update npm-post file
Mar 29, 2023
30b5958
refactor: remove sude from npm post
Mar 30, 2023
4b3b7df
refactor: update readme file
Apr 10, 2023
fd884bf
refactor: update script file
Apr 11, 2023
6bd3f6b
refactor: update script file
Apr 11, 2023
962fb69
Merge branch 'master' of github.com:edx/edx-analytics-dashboard into …
abdullahwaheed Jul 31, 2023
0a05422
fix: fixed indentation
abdullahwaheed Jul 31, 2023
3d53922
Merge branch 'master' into mashal-m/node-18-upgrade
abdullahwaheed Sep 4, 2023
e82ef51
Merge branch 'master' of github.com:edx/edx-analytics-dashboard into …
abdullahwaheed Sep 25, 2023
6de6ea0
build: update lock file
Sep 26, 2023
f1fadf4
fix: fix eslint rule
Sep 26, 2023
d218b96
fix: fix eslint rule
Sep 26, 2023
8d09689
fix: fix eslint rule
Sep 26, 2023
9d4504c
Fix: fix eslin
Sep 26, 2023
7a79799
build: update lock file
Sep 27, 2023
6ae652e
refactor: update co file
Sep 27, 2023
2f83809
refactor: update co file
Sep 27, 2023
f1d7ef9
refactor: update ci file
Sep 27, 2023
66fd120
refactor: update ci file
Sep 27, 2023
2fa44df
refactor: update ci file
Sep 27, 2023
2596859
refactor: update ci file
Sep 27, 2023
ac9e6b4
refactor: update ci file
Sep 27, 2023
4fb7e85
refactor: update ci file
Sep 27, 2023
8e7cb34
Merge branch 'master' into mashal-m/node-18-upgrade
abdullahwaheed Oct 10, 2023
d3b3d1f
Merge branch 'master' of github.com:edx/edx-analytics-dashboard into …
abdullahwaheed Feb 22, 2024
2124ea8
refactor: updated node config in default ci
abdullahwaheed Feb 22, 2024
d762a4f
Merge branch 'master' of github.com:edx/edx-analytics-dashboard into …
abdullahwaheed Mar 25, 2024
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
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"root": true,
"extends": "@edx/eslint-config",
"plugins": [
"import"
Expand Down
7 changes: 1 addition & 6 deletions .github/scripts/testing-js.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
if [[ $NODE == 16 ]]
then
export NODE_VERSION=16.14.0
else
export NODE_VERSION=12.11.1
fi
export NODE_VERSION=18.15.0

docker exec -t insights_testing bash -c "
cd /edx/app/insights/edx_analytics_dashboard/ &&
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
python-version: ["3.8"]
os: [ubuntu-20.04]
toxenv: [django42]
node: [16]
env:
DATA_API_VERSION: "latest"
steps:
Expand Down Expand Up @@ -42,12 +41,17 @@ jobs:
TESTNAME: quality
TARGETS: "quality"
TOXENV: ${{ matrix.toxenv }}

- name: Setup Nodejs
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: test js
run: ./.github/scripts/testing-js.sh
shell: bash
env:
TESTNAME: js
NODE: ${{ matrix.node }}
TOXENV: ${{ matrix.toxenv }}
TARGETS: "requirements.js validate_js"
- name: test i18n
Expand All @@ -62,16 +66,14 @@ jobs:
shell: bash
env:
TESTNAME: acceptance
NODE: ${{ matrix.node }}
TOXENV: ${{ matrix.toxenv }}
TARGETS: "requirements.a11y migrate requirements.js static accept"
- name: test python
run: ./.github/scripts/testing-js.sh
shell: bash
env:
TESTNAME: test-python
NODE: ${{ matrix.node }}
TOXENV: ${{ matrix.toxenv }}
TARGETS: "requirements.js static test_python"
- name: code cov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v3
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ WORKDIR ${INSIGHTS_CODE_DIR}/
# insights service config commands below
RUN pip install --no-cache-dir -r ${INSIGHTS_CODE_DIR}/requirements/production.txt

RUN nodeenv ${INSIGHTS_NODEENV_DIR} --node=16.14.0 --prebuilt \
&& npm install -g npm@8.5.x
RUN nodeenv ${INSIGHTS_NODEENV_DIR} --node=18.15.0 --prebuilt \
&& npm install -g npm@9.5.x

# Tried to cache the dependencies by copying related files after the npm install step but npm post install fails in that case.
COPY . ${INSIGHTS_CODE_DIR}/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Prerequisites
-------------
* Python 3.8.x
* [gettext](http://www.gnu.org/software/gettext/)
* [node](https://nodejs.org) 12.11.1
* [npm](https://www.npmjs.org/) 6.11.3
* [node](https://nodejs.org) 18.x.x
* [npm](https://www.npmjs.org/) 9.x.x

Warning: You must have NPM version 5.5.1. Using another version might result in
a different `package-lock.json` file. Committing those changes might break our
Expand Down
2 changes: 1 addition & 1 deletion npm-post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ PATTERN_LIBRARY_LIB_PATH="${PATTERN_LIBRARY_SASS_PATH}/global"
PATTERN_LIBRARY_LIBS=('bi-app-sass' 'bourbon' 'breakpoint-sass' 'susy')
for lib in "${PATTERN_LIBRARY_LIBS[@]}"
do
cp -rf ${NPM_PATH}/$lib $PATTERN_LIBRARY_LIB_PATH/
cp -rf ${NPM_PATH}/$lib $PATTERN_LIBRARY_LIB_PATH/
done

# pre-compile the pattern library to improve sass compilation performance
Expand Down
Loading
Loading