title: Running multiple versions of Node.js only running latest
body: <p>I have followed the guidelines for <a href="https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-running-multiple-versions-of-nodejs" rel="nofollow noreferrer">Running multiple versions of Node.js</a> using a <a href="https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix" rel="nofollow noreferrer">matrix strategy</a>:</p>
  <p><code>.github/workflows/build-test.yml</code>:</p>
  <pre class="lang-yaml prettyprint-override"><code>    jobs:
        build_and_test:
          runs-on: ubuntu-latest
      
          strategy:
            matrix:
              node: [10, 12, 14]
  </code></pre>
  <p>The workflow does initiate to test with the intended three different versions of Node:</p>
  <p><a href="https://i.stack.imgur.com/K0h0D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K0h0D.png" alt="GitHub Actions workflow" /></a></p>
  <p>However, each is running with the latest:</p>
  <p><a href="https://i.stack.imgur.com/MHkAH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MHkAH.png" alt="Workflow expecting Node v14" /></a></p>
  <p>For example, for Node v14, the workflow instead used Node v16.14.2:</p>
  <pre><code>/usr/local/bin/node --version
  v16.14.2
  /usr/local/bin/npm --version
  8.5.0
  </code></pre>
  <p>Why is this happening?</p>
  <p>Full yaml</p>
  <pre><code>name: Build and Test
  
  on:
    push:
      branches: [master]
    pull_request:
      branches: [master]
  
  jobs:
    build_and_test:
      runs-on: ubuntu-latest
  
      strategy:
        matrix:
          node: [10, 12, 14]
  
      steps:
        - name: Checkout
          uses: actions/checkout@v2
        - name: Use Node.js ${{ matrix.node-version }}
          uses: actions/setup-node@v1
          with:
            node-version: ${{ matrix.node-version }}
        - name: Install project
          run: npm install
        - name: Build the project
          run: npm run build --if-present
        - name: Run tests
          run: npm test
  </code></pre>