Skip to content

Merge pull request #293 from ral-facilities/renovate/testing-library-… #1671

Merge pull request #293 from ral-facilities/renovate/testing-library-…

Merge pull request #293 from ral-facilities/renovate/testing-library-… #1671

Workflow file for this run

name: CI Build
on:
pull_request:
# By default, the pull_request event type is not triggered when a PR is merged into main
push:
branches:
- main
- develop
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Setup Node.js
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version: 20
cache: 'yarn'
- name: Install dependencies
# Ubuntu 16+ does not install libgconf-2-4 by default, so we need to install it ourselves (for Cypress)
run: |
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 unit test coverage
if: success()
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3
- 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