From 59484624a44093b1b116e14cee83035b92169318 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 12 Nov 2021 21:48:52 +0100 Subject: [PATCH] Add CI --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..944b058b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + name: 'Builds' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: 14 + + - name: Cache node modules + id: cacheNodeModules + uses: actions/cache@v2 + with: + path: "**/node_modules" + key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('**/package-lock.json') }} + restore-keys: ${{ runner.os }}-cacheNodeModules- + + - name: Execute npm in root + if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} + run: npm install + + - name: Execute npm in monaco-editor-webpack-plugin + if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} + run: npm install --prefix monaco-editor-webpack-plugin + + - name: Build + run: npm run release + + - name: Run unit tests + run: npm test