Skip to content

Commit

Permalink
feat: use pwsh for windows runner (#188)
Browse files Browse the repository at this point in the history
* feat: use pwsh for windows runners

* fix: check 2 approaches
  • Loading branch information
mrexox authored Sep 4, 2023
1 parent 95b1a23 commit 3b7078e
Showing 1 changed file with 10 additions and 11 deletions.
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

0 comments on commit 3b7078e

Please sign in to comment.