Skip to content

Unit tests

Unit tests #6

Workflow file for this run

name: Unit tests
on:
workflow_dispatch:
#push:
pull_request:
jobs:
unit-win:
runs-on: windows-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run tests
shell: cmd
run: |
if exist %DENO_ROOT_PATH% rmdir /q/s %DENO_ROOT_PATH%
if not exist %DENO_ROOT_PATH% mkdir %DENO_ROOT_PATH%
call %GITHUB_WORKSPACE%\githubScripts\get-deno.cmd %DENO_ROOT_PATH%
call %GITHUB_WORKSPACE%\githubScripts\get-extraBin.cmd
call %GITHUB_WORKSPACE%\scripts\test.cmd --denoDir %DENO_ROOT_PATH%
%DENO_ROOT_PATH%\deno coverage --lcov --output=%GITHUB_WORKSPACE%\coverage\levain.windows.lcov
env:
DENO_ROOT_PATH: ${{ runner.temp }}\deno
GITHUB_WORKSPACE: ${{ github.workspace }}
unit-nix:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run tests
run: |
denoTemp=$( mktemp -d )
bash $GITHUB_WORKSPACE/githubScripts/get-deno.sh $denoTemp Linux
export PATH=${denoTemp}:$PATH
cd $GITHUB_WORKSPACE
echo bash ./scripts/test.sh
rm -rf ${denoTemp}