crystal-coverage icon indicating copy to clipboard operation
crystal-coverage copied to clipboard

Broken on Windows (`shards install` uses `make bin`)

Open drhuffman12 opened this issue 4 years ago • 0 comments

When I run on Windows, I get a Postinstall error

Run shards install
Resolving dependencies
Fetching https://github.com/lbguilherme/crystal-coverage.git
Installing coverage (0.1.0 at 4148e9e)
Postinstall of coverage: make bin
Error: Process completed with exit code 1.

For clarification, I run shards install in a build for https://github.com/drhuffman12/crystal-coverage-example. See the .github/workflows/ci.yml file in that repo; it basically looks like below, but with some tweeks:

jobs:
  build:
    # TODO: Get the Windows builds working...
    # continue-on-error: ${{ matrix.os.windows-latest }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        # os: [ubuntu-latest, macos-latest]
        crystal: [null]
        include:
          - os: ubuntu-latest
            crystal: nightly
    runs-on: ${{matrix.os}}

    steps:
      - name: Build
        run: shards install

      - name: Test
        run: crystal spec

      - name: Check formatting
        run: crystal tool format --check src spec

      - name: Check code coverage
        run: bin/crystal-coverage
...

(For now, I'll refactor my ci.yml to only run coverage on the linux part of the ci matrix. That's good enough for me, but some people might need to run coverage on a Windows box.)

drhuffman12 avatar Sep 06 '21 22:09 drhuffman12