on:
  push:
    branches: [master]
  pull_request:
name: coverage
jobs:
  test:
    runs-on: ubuntu-latest
    container:
      image: xd009642/tarpaulin
      options: --security-opt seccomp=unconfined
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - name: Generate code coverage
        run: |
          cargo tarpaulin --verbose --all-features --timeout 120 --out Xml
      - name: Upload to codecov.io
        uses: codecov/codecov-action@v2
        with:
          fail_ci_if_error: true
