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: add node 16 testing #239

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
68 changes: 36 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,48 @@ name: CI
on: [push]

jobs:
build:
tests:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 14, 16]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
- name: Checkout
uses: actions/checkout@v2
with:
# pulls all commits (needed for lerna / semantic release to correctly version)
fetch-depth: 0
fetch-depth: 0
# pulls all tags (needed for lerna / semantic release to correctly version)
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup Nodejs
uses: actions/setup-node@v1
with:
node-version: 12
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup Nodejs
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
# lerna expects to be authenticated for publishing to NPM. This step will fail CI if NPM is not
# authenticated, even though this build does _not_ attempt to publish, as an extra check before merge
# that Lerna is set to publish.
- name: Check NPM authentication
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}" >> .npmrc
npm whoami
- name: Install and Setup Dependencies
run: |
npm install
lerna bootstrap --include-dependencies --include-dependents --since origin/master
- name: Check NPM authentication
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}" >> .npmrc
npm whoami
- name: Install and Setup Dependencies
run: |
npm install
lerna bootstrap --include-dependencies --include-dependents --since origin/master
# build must come before running linting and tests for the `dist` directory to exist.
- name: Build
run: lerna run build --include-dependencies --include-dependents --since origin/master --parallel
- name: Lint
run: lerna run lint --include-dependencies --include-dependents --since origin/master --parallel
- name: Test
run: lerna run test --include-dependencies --include-dependents --since origin/master --parallel
- name: Coverage Report
uses: codecov/codecov-action@v1
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Preview Updated Versions (dry run)
run: lerna version --allow-branch ${{ steps.extract_branch.outputs.branch }} --no-git-tag-version --no-changelog --no-push --yes
- name: Build
run: lerna run build --include-dependencies --include-dependents --since origin/master --parallel
- name: Lint
run: lerna run lint --include-dependencies --include-dependents --since origin/master --parallel
- name: Test
run: lerna run test --include-dependencies --include-dependents --since origin/master --parallel
- name: Coverage Report
uses: codecov/codecov-action@v1
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Preview Updated Versions (dry run)
run: lerna version --allow-branch ${{ steps.extract_branch.outputs.branch }} --no-git-tag-version --no-changelog --no-push --yes

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"@commitlint/config-conventional": "13.2.0",
"@edx/frontend-platform": "1.9.6",
"@edx/frontend-platform": "1.15.2",
"@edx/paragon": "14.5.0",
"husky": "6.0.0",
"lerna": "4.0.0",
Expand Down
Loading