Skip to content

Commit

Permalink
Merge pull request #32 from santisq/30-update-ci-pipeline-to-use-code…
Browse files Browse the repository at this point in the history
…cov-actionv4

Closes #30
  • Loading branch information
santisq authored Jun 24, 2024
2 parents 7f7820e + 27abafb commit 766d375
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
fail-fast: false
matrix:
info:
- name: PS_5.1
- name: PS-5.1
psversion: '5.1'
os: windows-latest
- name: PS_7_Windows
- name: PS-7_Windows
psversion: '7'
os: windows-latest
- name: PS_7_Linux
- name: PS-7_Linux
psversion: '7'
os: ubuntu-latest

Expand Down Expand Up @@ -89,17 +89,13 @@ jobs:
- name: Run Tests - Windows PowerShell
if: ${{ matrix.info.psversion == '5.1' }}
shell: pwsh
run: |
powershell.exe -NoProfile -File ./build.ps1 -Configuration $env:BUILD_CONFIGURATION -Task Test
exit $LASTEXITCODE
shell: powershell
run: ./build.ps1 -Configuration $env:BUILD_CONFIGURATION -Task Test

- name: Run Tests - PowerShell
if: ${{ matrix.info.psversion != '5.1' }}
shell: pwsh
run: |
pwsh -NoProfile -File ./build.ps1 -Configuration $env:BUILD_CONFIGURATION -Task Test
exit $LASTEXITCODE
run: ./build.ps1 -Configuration $env:BUILD_CONFIGURATION -Task Test

- name: Upload Test Results
if: always()
Expand All @@ -117,10 +113,11 @@ jobs:

- name: Upload Coverage to codecov
if: always() && !startsWith(github.ref, 'refs/tags/v')
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./output/TestResults/Coverage.xml
flags: ${{ matrix.info.name }}
token: ${{ secrets.CODECOV_TOKEN }}

publish:
name: publish
Expand Down
11 changes: 10 additions & 1 deletion src/PSTree/PSTree.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>PSTree</AssemblyName>
<LangVersion>preview</LangVersion>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PowerShellStandard.Library" Version="5.1.1" PrivateAssets="all" />
</ItemGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
</ItemGroup>

</Project>

0 comments on commit 766d375

Please sign in to comment.