Skip to content

Unit tests

Unit tests #391

Workflow file for this run

name: Unit tests
on:
pull_request:
schedule:
- cron: '0 2 * * *'
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
env:
NODE_VERSION: current
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- name: Deploy rancher head
run: npm run start-rancher
- name: Build package from the current branch
run: npm run build-npm
- name: Run e2e tests
run: npm run start-unit-tests
- name: Upload Cypress screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: cypress-screenshots-basics-unit-tests
path: cypress/screenshots
retention-days: 7
if-no-files-found: ignore
- name: Upload Cypress videos
# Test run video is always captured, so this action uses "always()" condition
if: always()
uses: actions/upload-artifact@v4
with:
name: cypress-videos-basics-unit-tests
path: cypress/videos
retention-days: 7