Merge pull request #975 from ix5/js-tests-update #189
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: 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 |