name: Node.js CI on: push: branches: [ main ] pull_request: branches: [ main ] jobs: build: strategy: matrix: node-version: [12.x, 14.x, 16.x, 18.x] platform: - os: ubuntu-latest shell: bash - os: macos-latest shell: bash - os: windows-latest shell: bash - os: windows-latest shell: powershell runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - run: npm i --ignore-scripts --no-audit --no-fund - run: npm test