From 160fc9fae33efd1f5769536b96968da742c54943 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 11 Dec 2019 17:20:46 -0800 Subject: [PATCH] devops: enable Linux Github actions --- .github/workflows/nodejs.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000000..0f483c8cbc --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,35 @@ +name: Node CI + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-18.04 + + strategy: + matrix: + node-version: [12.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: install required packages + run: | + sudo apt-get install libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 + sudo apt-get install xvfb + export DISPLAY=:99.0 + Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 & + + - name: npm install, build, and test + run: | + npm ci + npm run build --if-present + xvfb-run --auto-servernum npm run unit + xvfb-run --auto-servernum npm run funit + xvfb-run --auto-servernum npm run wunit + env: + CI: true