Skip to content

JS: Minor jest-puppeteer test fix, update Javascript dev dependencies #185

JS: Minor jest-puppeteer test fix, update Javascript dev dependencies

JS: Minor jest-puppeteer test fix, update Javascript dev dependencies #185

name: Javascript client
on:
push:
paths:
- "package.json"
- "isso/js/**"
- ".github/workflows/javascript-client.yml"
pull_request:
paths:
- "package.json"
- "isso/js/**"
- ".github/workflows/javascript-client.yml"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16]
fail-fast: false
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up NodeJS ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: package.json
- name: Install Javascript test dependencies using npm
env:
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
run: npm install
- name: Run Javascript Jest test suite - unit tests
run: npm run test-unit
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16]
fail-fast: false
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up NodeJS ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: package.json
- name: Install Javascript dependencies using npm
run: make init
- name: Create Javascript client files
run: make js
- name: Archive and upload generated minified client files
uses: actions/upload-artifact@v3
with:
name: client-js-files
path: |
isso/js/embed.*.js
isso/js/count.*.js
isso/js/embed.dev.js.map
isso/js/count.dev.js.map
if-no-files-found: error