name: Swift

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: swift build -v
    - name: Run tests
      run: swift test -v

name: Swift

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  macOS:

    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v2
    - name: macOS
      run: swift build -v
    - name: Run macOS tests
      run: swift test -v
      
  linux:
    
    runs-on: ubuntu-latest
    container:
      image: swift:latest
    steps:
      - uses: actions/checkout@v2
      - name: Run Linux tests
        run: swift test -c debug --enable-test-discovery

Add Linux tests on workflow
Add Linux tests on workflow