name: Swift

on: [push]

jobs:
  build:

    runs-on: [macOS-latest, ubuntu-latest]

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

name: Test

on: [push]

jobs:
  build:
    strategy:
      matrix:
        os: [macOS-latest, ubuntu-latest]
        swift: [5.1.1]
    runs-on: ${{ matrix.os }}
    env:
      SWIFT_VERSION: ${{ matrix.swift }}
      SWIFT_EXEC: .swiftenv/shims/swift
    steps:
    - uses: actions/checkout@v1
    - name: Install swift
      run: |
        git clone https://github.com/kylef/swiftenv.git ~/.swiftenv
        ~/.swiftenv/bin/swiftenv install "$SWIFT_VERSION" || true
    - name: Build
      run: |
        ~/$SWIFT_EXEC --version
        ~/$SWIFT_EXEC build
    - name: Run tests
      run: |
        ~/$SWIFT_EXEC test

Fix issues with Github actions
Fix issues with Github actions
