Skip to content

Inspector

Inspector #156

name: Verify (Windows)
on:
workflow_call:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
test:
runs-on: windows-latest
strategy:
matrix:
shell:
# tests pass in all shells, but in powershell and pwsh, they `echo $?` as false
# this causes tests to fail in CI. We'll need to run only bash and cmd until
# we figure this out.
# - powershell
# - pwsh
- bash
- cmd
defaults:
run:
shell: ${{matrix.shell}}
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- run: deno fmt --check
- run: deno lint
- run: deno task generate-importmap "^3" v3.importmap.json
- run: deno task generate-importmap v4 v4.importmap.json
- name: "Test V3 (${{matrix.shell}})"
if: matrix.shell == 'powershell' || matrix.shell == 'pwsh'
run: |
$env:SHELL = "${{matrix.shell}}"
deno test --import-map v3.importmap.json --allow-net --allow-read --allow-write --allow-env --allow-run --allow-ffi --trace-leaks
- name: "Test V4 (${{matrix.shell}})"
if: matrix.shell == 'powershell' || matrix.shell == 'pwsh'
run: |
$env:SHELL = "${{matrix.shell}}"
deno test --import-map v4.importmap.json --allow-net --allow-read --allow-write --allow-env --allow-run --allow-ffi --trace-leaks
- name: "Test V3 (${{matrix.shell}})"
if: matrix.shell == 'cmd'
run: |
set SHELL=${{matrix.shell}}
deno test --import-map v3.importmap.json --allow-net --allow-read --allow-write --allow-env --allow-run --allow-ffi --trace-leaks
- name: "Test V4 (${{matrix.shell}})"
if: matrix.shell == 'cmd'
run: |
set SHELL=${{matrix.shell}}
deno test --import-map v4.importmap.json --allow-net --allow-read --allow-write --allow-env --allow-run --allow-ffi --trace-leaks
- name: "Test V3 (${{matrix.shell}})"
if: matrix.shell == 'bash'
run: |
export SHELL=${{matrix.shell}}
deno test --import-map v3.importmap.json --allow-net --allow-read --allow-write --allow-env --allow-run --allow-ffi --trace-leaks
- name: "Test V4 (${{matrix.shell}})"
if: matrix.shell == 'bash'
run: |
export SHELL=${{matrix.shell}}
deno test --import-map v4.importmap.json --allow-net --allow-read --allow-write --allow-env --allow-run --allow-ffi --trace-leaks