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

feat: use pwsh for windows #188

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 10 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,19 @@ runs:

- name: Install coveralls reporter (Windows)
if: startsWith(runner.os, 'Windows')
shell: bash
shell: pwsh
run: |
mkdir -p ~/bin/
cd ~/bin/
curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-windows.zip
curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-checksums.txt
cat coveralls-checksums.txt | grep coveralls-windows.zip | sha256sum --check
zcat coveralls-windows.zip > coveralls.exe
rm coveralls-checksums.txt
echo ~/bin >> $GITHUB_PATH
New-Item -Path $env:HOME\bin -ItemType directory
Push-Location $env:HOME\bin
Invoke-WebRequest -Uri "https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-windows.exe" -OutFile "coveralls.exe"
Invoke-WebRequest -Uri "https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-checksums.txt" -OutFile "sha256sums.txt"
(Get-FileHash coveralls.exe).Hash -eq (Get-Content ./sha256sums.txt | Where-Object{$_ -match 'windows.exe'} | ForEach-Object{($_ -split "\s+")[0]})
Remove-Item *.txt -Force
echo $env:HOME\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Done report
if: inputs.parallel-finished == 'true'
shell: bash
shell: ${{ startsWith(runner.os, 'Windows') && 'pwsh' || 'bash' }}
run: >-
coveralls done
${{ inputs.debug == 'true' && '--debug' || '' }}
Expand All @@ -128,7 +127,7 @@ runs:

- name: Coverage report
if: inputs.parallel-finished != 'true'
shell: bash
shell: ${{ startsWith(runner.os, 'Windows') && 'pwsh' || 'bash' }}
run: >-
coveralls report
${{ inputs.debug == 'true' && '--debug' || '' }}
Expand Down