Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: bug in windows line doc/examples/github-actions.yml #117

Open
aburrell opened this issue Mar 29, 2024 · 1 comment
Open

DOC: bug in windows line doc/examples/github-actions.yml #117

aburrell opened this issue Mar 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@aburrell
Copy link

What was wrong?

Following this example will result in the Windows reports failing

Run curl -sL https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-windows.zip | zcat > ./coveralls.exe
InvalidOperation: D:\a\_temp\3862d081-6a06-42ea-a5e2-99028ad6949b.ps1:2
Line |
   2 |  … leases/latest/download/coveralls-windows.zip | zcat > ./coveralls.exe
     |                                                   ~~~~~~~~~~~~~~~~~~~~~~
     | Cannot run a document in the middle of a pipeline: C:\Program Files\Git\usr\bin\zcat.
Error: Process completed with exit code 1.

Potential fix

Using the bash command on the README works. Recommend updating the example yaml to include the line from the README.

@aburrell aburrell added the bug Something isn't working label Mar 29, 2024
@nhubbard
Copy link

nhubbard commented May 16, 2024

I wrote my own PowerShell command to make it work correctly:

# Other info removed for clarity
jobs:
  build:
    steps:
      - name: Report Coveralls (Windows)
        if: startsWith(runner.os, 'Windows')
        run: |
          Invoke-WebRequest -Uri "https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-windows.zip" -OutFile "coveralls-windows.zip"
          Add-Type -AssemblyName System.IO.Compression.FileSystem
          [System.IO.Compression.ZipFile]::ExtractToDirectory("coveralls-windows.zip", ".")
          Remove-Item "coveralls-windows.zip"
          Start-Process -FilePath ".\coveralls.exe" -ArgumentList "report build/reports/kover/report.xml" -NoNewWindow -Wait
        env:
          COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

I did edit the last line to change the report path for my specific use-case, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants