Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: upgrade to node16 #259

Merged
merged 5 commits into from
Dec 2, 2021
Merged
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
41 changes: 22 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,37 @@ on:
- master
pull_request:
branches:
- '**'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my editor / vscode reformatted this file if this is not acceptable, I can revert! I have to check what settings exist that are doing this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be an issue. If this is the only change, then you can merge with this change since both versions are syntactically correct.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I don't think the "**" is needed here. Just having pull_request under on should suffice to get the workflow to run on all Paragon PR updates.

- "**"

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Setup Nodejs
uses: actions/setup-node@v1
with:
node-version: 12
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV

- name: Install dependencies
run: npm ci
- name: Setup Nodejs
uses: dcodeIO/setup-node-nvm@v4
with:
node-version: "${{ env.NODE_VER }}"

- name: Lint
run: npm run lint
- name: Install dependencies
run: npm ci

- name: Test
run: npm run test
- name: Lint
run: npm run lint

- name: Build
run: npm run build
- name: Test
run: npm run test

- name: Docs
run: npm run docs
- name: Build
run: npm run build

- name: Run Coverage
uses: codecov/codecov-action@v2
- name: Docs
run: npm run docs

- name: Run Coverage
uses: codecov/codecov-action@v2
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node.js Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV

- name: Setup Node.js
uses: actions/setup-node@v1
uses: dcodeIO/setup-node-nvm@v4
with:
node-version: 12
node-version: "${{ env.NODE_VER }}"

- name: Install dependencies
run: npm ci
Expand Down
2 changes: 2 additions & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
v16

22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ In addition, frontend-platform provides an extensible application initialization

## Getting started

### One-time setup if you have not ugpraded node/npm
IMPORTANT: There is now a new node/npm version being used by frontend-platform as of
https://github.com/edx/frontend-platform/pull/259

#### Install nvm
This is highly recommended in order to be able to leverage different node/npm versions.
For a period of time, different repositories may be using different versions of node/npm.

Alternatively, please install node16 and npm8 for use with this repository.

#### Switch to node/npm version for this repo
```nvm use```
if you don't have the right node/npm versions, nvm will instruct you to install those

#### Clean out old node modules and reinstall
This step is needed because node now uses a different package lock format, and it's important to reinstall
dependencies based on this new package file. Delete node_modules, and issue a `npm ci`


### Standard getting started steps

1. `npm install`
2. `npm start`
3. Open http://localhost:8080 to view the example app.
Expand Down Expand Up @@ -116,4 +137,3 @@ NOTE: As of this writing, i18n is _not_ configurable. The `initialize()` functi
When making changes to frontend-platform, be sure to manually run the included example app located in `./example`. The example app includes 2 routes to test for both unauthenticated and authenticated users. To start the example app, run `npm start` from the root directory.

If you want to test changes to frontend-platform against a micro-frontend locally, follow the directions here: https://github.com/edx/frontend-build#local-module-configuration-for-webpack

Loading