From 809edf6dadc7106c526788de29c36fdd53d8a6b5 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Thu, 19 Jan 2023 14:22:56 +0100 Subject: [PATCH] change(actions): added test yaml file --- .github/workflows/ui-tests.js.yaml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/ui-tests.js.yaml diff --git a/.github/workflows/ui-tests.js.yaml b/.github/workflows/ui-tests.js.yaml new file mode 100644 index 000000000..ad8e378c7 --- /dev/null +++ b/.github/workflows/ui-tests.js.yaml @@ -0,0 +1,40 @@ +# Checking unit and visual tests locally on every merge rq to dev and main +name: Frontend tests + +on: + workflow_dispatch: + push: + branches: [ "main" ] + paths: + - frontend/** + pull_request: + branches: [ "dev", "main" ] + paths: + - frontend/** +jobs: + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./frontend + strategy: + matrix: + node-version: [16.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 }} + - name: Setup packages + run: npm i --legacy-peer-deps --ignore-scripts + - name: Run unit tests + run: npm test --if-resent + - name: Run Frontend + run: npm start + - name: Wait for frontend + run: npx wait-on http://0.0.0.0:3333 + - name: Run visual tests + run: npm run cy:test --if-present \ No newline at end of file