name: Unit Tests
on:
workflow_call:
jobs:
check:
name: Unit Test (${{ matrix.os }}.${{ matrix.node }})
permissions:
contents: read
actions: write
strategy:
fail-fast: false
matrix:
node: ['20', '22', '24']
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
runs-on: ${{ matrix.os }}
steps:
- name: ⬇️ Checkout Code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
- name: 🧑🔧 Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies
- name: 🐢 Setup Node ${{ matrix.node }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Download Build Archive
uses: ./.github/workflows/actions/download-archive
with:
name: webdriverio
path: .
filename: webdriverio-build.zip
- name: Unit Tests
run: pnpm run test:unit:run
shell: bash
- name: Check Git Context
if: matrix.os != 'windows-latest'
uses: ./.github/workflows/actions/check-git-context