name: Tests

on:
  push:
    branches: [ master ]
    paths-ignore: [ README.md ]
  pull_request:
    branches: [ master ]
    paths-ignore: [ README.md ]
jobs:
  build:
    name: Build and test on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-10.15, ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
    steps:
    - uses: actions/checkout@v2
    - name: Run tests
      run: swift test --enable-test-discovery

name: Tests

on:
  push:
    branches: [ master ]
    paths-ignore: [ README.md ]
  pull_request:
    branches: [ master ]
    paths-ignore: [ README.md ]
jobs:
  build:
    name: Build and test on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-10.15, ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
    steps:
    - uses: actions/checkout@v2
    - name: Test and publish code coverage to Code Climate
      uses: paulofaria/codeclimate-action@master
      if: matrix.os == 'macos-10.15'
      env:
        CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
      with:
        downloadUrl: https://github.com/paulofaria/test-reporter/releases/download/0.9.0/test-reporter-0.9.0-darwin-amd64
        coverageCommand: swift test --enable-test-discovery --enable-code-coverage
        coverageLocations: $(swift test --show-codecov-path):lcov-json

Add Code Climate test report to github action.
Add Code Climate test report to github action.
