mirror of
https://github.com/nix-community/NixOS-WSL.git
synced 2026-11-07 14:59:35 +00:00
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
workflow_call: {}
|
|
|
|
jobs:
|
|
prepare:
|
|
name: Find Tests 🔍
|
|
runs-on: ubuntu-26.04
|
|
outputs:
|
|
tests: ${{ steps.tests.outputs.tests }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
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
|
|
|
|
# Note: Tests only run on x86_64. The windows-11-arm runner does not support nested virtualization.
|
|
tests:
|
|
name: Test 🧪
|
|
needs:
|
|
- prepare
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
test: ${{ fromJSON(needs.prepare.outputs.tests) }}
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Download Tarball 📥
|
|
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
with:
|
|
name: tarball-x86_64
|
|
|
|
- name: Setup WSL 🐧
|
|
run: |
|
|
wsl --update
|
|
Get-Command wsl
|
|
wsl --version
|
|
|
|
- name: Execute Test 🧪
|
|
shell: pwsh
|
|
run: Invoke-Pester -Output Detailed ${{ matrix.test }}
|