name: Generate and upload code coverage on: #On push to common branches, this computes the "bases stats" for PRs push: branches: - main pull_request: workflow_dispatch: jobs: All_Tests: name: All tests runs-on: ubuntu-20.04 strategy: matrix: nim-options: [ "" ] test-program: [ "test" ] steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Environment setup run: | sudo apt-get update sudo apt-get install -y lcov build-essential git curl mkdir coverage - name: Restore nimble dependencies from cache id: nimble_deps uses: actions/cache@v3 with: path: | ~/.nimble key: ubuntu-20.04-amd64-${{ hashFiles('nimble.lock') }} - name: Setup Nimble uses: "./.github/actions/install_nimble" with: os: linux cpu: x64 - name: Setup Env run: | nimble -v - name: Setup Deps run: | nimble install -d nimble setup - name: Run tests run: | nimble -y --verbose coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 with: directory: ./coverage/ fail_ci_if_error: true files: ./coverage/coverage.f.info flags: unittests name: codecov-umbrella verbose: true