# https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-nodejs

name: ci
on: [push, pull_request]
jobs:
  ci:
    strategy:
      fail-fast: false
      matrix:
        node-version: ['18.x', '20.x', '22.x', '24.x', '25.x']
        os: [windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
      - run: npm ci
      - run: npm run build --if-present
      # https://community.chocolatey.org/packages?q=Excel
      - name: "Installing Office 365 takes about 5 minutes..."
        run: choco install office365proplus
      - run: |
          npm install -g mocha
          # mocha --expose-gc test  # Three tests will fail!
      - run: npm test
