Skip to content

Catalogue category refactor #94 #323

Catalogue category refactor #94

Catalogue category refactor #94 #323

Workflow file for this run

name: CI Build
on:
pull_request:
push:
branches:
- main
- develop
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Setup Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version: '16.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install dependencies
run: |
npm config set scripts-prepend-node-path true
sudo apt-get install libgconf-2-4
yarn --immutable
- name: Run linting
run: yarn lint:js
- name: Run unit tests
run: yarn test
- name: Upload coverage reports to Codecov
if: success()
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run e2e tests
run: yarn e2e
- name: Upload Cypress screenshots
if: failure()
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
with:
name: OperationsGateway Screenshots
path: cypress/screenshots