Edit

kc3-lang/libevent/.github/workflows/coverage.yml

Branch :

  • Browse

    Commit

  • Author : yuangongji
    Date : 2020-01-21 19:51:48
    Hash : 84bb2c18
    Message : github actions: test and coverage

  • .github/workflows/coverage.yml
  • ---
    name: coverage
    
    on:
      push:
        branches:
          - master
        paths-ignore:
          - '**.md'
          - '.mailmap'
          - 'ChangeLog*'
          - 'whatsnew*'
          - 'LICENSE'
    
    jobs:
      linux:
        runs-on: ubuntu-16.04
        steps:
          - uses: actions/checkout@v2.0.0
          - name: Cache
            uses: actions/cache@v1.0.3
            with:
              path: build
              key: ${{ matrix.os }}-coverage
    
          - name: Install Depends
            run: sudo apt install zlib1g-dev libssl-dev build-essential lcov
    
          - name: Build And Test
            shell: bash
            run: |
                export JOBS=20
                export CTEST_PARALLEL_LEVEL=$JOBS
                export CTEST_OUTPUT_ON_FAILURE=1
                mkdir -p build
                cd build
                cmake .. -DEVENT__COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug
                make -j $JOBS
                make verify_coverage
    
          - name: Coveralls GitHub Action
            uses: coverallsapp/github-action@v1.0.1
            with:
              github-token: ${{ secrets.GITHUB_TOKEN }}
              path-to-lcov: ./build/coverage.info.cleaned
    
          - uses: actions/upload-artifact@v1
            if: failure()
            with:
              name: coverage-build
              path: build