From 89ef11733099aa80de5a0b80f321ab9eede00965 Mon Sep 17 00:00:00 2001 From: Serban Ghita Date: Tue, 5 Dec 2023 00:09:02 +0200 Subject: [PATCH] Added first GH workflow --- .github/workflows/test.yml | 32 ++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..35610c7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Tests + +on: + push: + branches: [ "v.2.1.0" ] + pull_request: + branches: [ "v.2.1.0" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build + - run: npm run test:unit-and-acceptance + - run: npm run test:e2e diff --git a/package.json b/package.json index df073ce..10e60fe 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "license": "MIT", "scripts": { "tsc": "tsc", - "build:production": "webpack --mode production", + "build": "webpack --mode production", "dev": "webpack --mode development -d inline-source-map --watch", "test:unit-and-acceptance": "jest", "test:e2e": "wdio run ./wdio.conf.ts"