name: CI

on:
  push:
  pull_request:
    branches: ["*"]
    tags-ignore: ["**"]

jobs:
  macos:
    runs-on: macOS-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Build
        run: swift build

  linux:
    runs-on: ubuntu-latest
    container:
      image: swift:5.2
      options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --security-opt apparmor=unconfined
    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Build
        run: swift build

name: CI

on:
  push:
  pull_request:
    branches: ["*"]
    tags-ignore: ["**"]

jobs:
  macos:
    runs-on: macOS-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1

       - name: Build and Test
        run: swift test
      
      - name: Code Cov
        if: github.ref == 'refs/heads/master'
        run: bash <(curl -s https://codecov.io/bash)

  linux:
    runs-on: ubuntu-latest
    container:
      image: swift:5.2
      options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --security-opt apparmor=unconfined
    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Build and Test
        run: swift test --enable-test-discovery

Fix Linux build and submit codecov.
Fix Linux build and submit codecov.
