John/npm version #58
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests and Build | |
on: | |
# Updated to only run on pull requests to dev because all pushed to main will go through dev | |
pull_request: | |
branches: | |
# - main | |
- dev | |
# push: | |
# branches: | |
# - main | |
# - dev | |
jobs: | |
unit-testing-extension: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.7.0' | |
cache: 'npm' | |
- name: Install Extension dependencies | |
run: | | |
cd extension | |
npm ci | |
- name: Build Extension | |
run: | | |
cd extension | |
npm run build | |
- name: Test Extension | |
run: | | |
cd extension | |
npm test | |
unit-testing-package-react: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- name: Install Package dependencies | |
run: | | |
cd package-react | |
npm ci | |
- name: Install linux handler for github actions | |
run: | | |
cd package-react | |
npm i @rollup/rollup-linux-x64-gnu | |
- name: Build Package | |
run: | | |
cd package-react | |
npm run build | |
- name: Test Package | |
run: | | |
cd package-react | |
npm test | |