Matrix not working for c# language

I have a matrix in travils.yml file for multi-os testing. for linux and osx. but whenever a build is triggered, it only picks up the linux build but not osx build.

this is how my config looks like:

language: csharp
mono: none

cache:
  directories:
    - $HOME/.nuget/packages

#--------- TEST MATRIX --------------
matrix:
  include:
    - name: test on macos using dotnet 2.1.300
      os: osx
      dotnet: 2.1.300
    - name: test on linux using dotnet 2.1
      os: linux
      dotnet: 2.1

script:
  - ./build.sh
#-----------------------------------

#--------- DEPLOYMENT --------------
jobs: 
  include:
    - stage: deploy
      script:
        - echo "DEPLOYING PROJECT"
      os: linux
#-----------------------------------

https://travis-ci.com/bilal-fazlani/commanddotnet/jobs/171671380/config

I realised using stages was a better option and moved on