taiki-e / cargo-llvm-cov

Cargo subcommand to easily use LLVM source-based code coverage (-C instrument-coverage).
Apache License 2.0
933 stars 57 forks source link

Github Action workflow not working as expected. #388

Closed dominique120 closed 3 weeks ago

dominique120 commented 3 weeks ago

I'm having an issue here with the workflow file. I'm not sure if its an issue with my setup of something wrong with the workflow itself.

I've set up the action file in this way:

      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov
      - name: Run llvm-cov coverage analysis
        run: cargo llvm-cov --fail-under-functions 70 --fail-under-lines 75

These are the results of the pipeline: image

taiki-e commented 3 weeks ago

Could you provide more info on the workflow?

It does not appear to be a GitHub-hosted runner and probably GITHUB_PATH does not handled correctly.

dominique120 commented 3 weeks ago

They are self hosted. Here is the complete job:

  coverage:
    strategy:
      fail-fast: false

    runs-on: [ self-hosted, default ]

    steps:
      - uses: actions/checkout@v2
      - name: Cargo cache
        uses: actions/cache@v2
        with:
          path: |
            ~/.cargo/registry
            ./target
          key: build-cargo-registry
      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov
      - name: Run llvm-cov coverage analysis
        run: cargo llvm-cov --fail-under-functions 70 --fail-under-lines 75

Worst case scenario I can just install via cargo and use it like that.

taiki-e commented 3 weeks ago

Setting CARGO_HOME env var with the actual cargo home for name: Install cargo-llvm-cov may work...

(Although I think the underlying solution would be to get GITHUB_PATH working correctly on that runner.)

dominique120 commented 3 weeks ago

Thanks I'll do that!