Skip to content

chat component

chat component #4

name: Build Components
on:
pull_request:
paths:
- 'components/**'
push:
branches:
- main
paths:
- 'components/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Disable AppArmor
# Ubuntu >= 23 has AppArmor enabled by default, which breaks Puppeteer.
# See https://github.com/puppeteer/puppeteer/issues/12818 "No usable sandbox!"
# this is taken from the solution used in Puppeteer's own CI: https://github.com/puppeteer/puppeteer/pull/13196
# The alternative is to pin Ubuntu 22 or to use aa-exec to disable AppArmor for commands that need Puppeteer.
# This is also suggested by Chromium https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
shell: bash
- name: Install dependencies
run: npm install
working-directory: ./components/chat_widget
- name: Run tests
run: npm run test
working-directory: ./components/chat_widget
- name: Build
run: npm run build
working-directory: ./components/chat_widget