fix: PowerShell fallback when wmic is unavailable on Windows (0.6.1) … #62
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test-windows | |
| on: | |
| push: | |
| branches: '*' | |
| pull_request: | |
| branches: '*' | |
| jobs: | |
| test: | |
| # windows-latest is Windows Server 2025, which ships without wmic, so the | |
| # integration tests here run against the PowerShell fallback in lib/get.js. | |
| runs-on: windows-latest | |
| name: AVA & TSD & Benchmark & Codecov | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: [current, 22, 20, 18] | |
| steps: | |
| - name: Setup repo | |
| uses: actions/checkout@v3 | |
| - name: Setup node ${{ matrix.node }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install lib dependencies | |
| run: | | |
| npm install --only=prod | |
| npm list --prod --depth=0 | |
| - name: Install dev dependencies | |
| run: | | |
| npm install --only=dev | |
| npm list --dev --depth=0 | |
| - name: Run tests | |
| if: ${{ matrix.node <= 6 }} | |
| run: npm run test | |
| - name: Run tests | |
| if: ${{ !(matrix.node <= 6) }} | |
| run: npm run test:windows | |
| #- name: Run type checking | |
| # run: npm run types | |
| - name: Run benchmark | |
| run: | | |
| npm run bench | |
| - name: Upload coverage to Codecov | |
| if: ${{ matrix.node <= 6 }} | |
| uses: codecov/codecov-action@v2 |