name: uvwasi coverage

on: [push, pull_request]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
    steps:
      - uses: actions/checkout@v2
      - name: Test Coverage
        run: |
          sudo apt update && sudo apt install lcov -y
          cmake -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug .
          cmake --build . --target check
          cd CMakeFiles
          lcov --directory . --capture --output-file coverage.info
          genhtml coverage.info
