Skip to content

Enable tests on Windows #1

Enable tests on Windows

Enable tests on Windows #1

Workflow file for this run

name: Tests
on:
workflow_call: {}
jobs:
prepare:
name: Find Tests 🔍
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.tests.outputs.tests }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Nix ❄️
uses: ./.github/actions/install-nix
- name: Find Tests 🔍
id: tests
run: |
find tests -name '*.Tests.ps1' -print0 | perl -pe 's|(.*?)\x0|"\1",|g;s|,$||;s|(.*)|tests=[\1]|' >> $GITHUB_OUTPUT
tests:
name: Test (Docker) 🐳
needs:
- prepare
strategy:
fail-fast: false
matrix:
test: ${{ fromJSON(needs.prepare.outputs.tests) }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download Tarball 📥
uses: actions/download-artifact@v4
with:
name: tarball-test-docker
- name: Execute Test 🧪
shell: pwsh
run: |
Invoke-Pester -Output Detailed ${{ matrix.test }}
tests:

Check failure on line 51 in .github/workflows/run_tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/run_tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 51
name: Test (WSL) 🧪
needs:
- prepare
strategy:
fail-fast: false
matrix:
test: ${{ fromJSON(needs.prepare.outputs.tests) }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download Tarball 📥
uses: actions/download-artifact@v4
with:
name: tarball-test-windows
- name: Update WSL to enable support of WSL2
run: |
wsl --update
wsl --version
- name: Execute Test 🧪
if: runner.os == 'Windows'
shell: bash
run: |
wsl dmesg -w &
pwsh -c "Invoke-Pester -Output Detailed ${{ matrix.test }}"