Skip to content

Commit

Permalink
ci: Fix workflow (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza authored May 20, 2024
1 parent 55eaea2 commit 24f7bbe
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
38 changes: 25 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,40 @@ on:
paths-ignore:
- '**/**.md'
jobs:
build:
check-ci:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up NuGet
uses: NuGet/setup-nuget@v1.1.1
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '5.0.x'
- name: Cache NuGet packages
uses: actions/cache@v2
with:
path: |
~/.nuget/packages
~/.local/share/NuGet/Cache
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore NuGet packages
run: nuget restore Parse.sln
- name: Install Chocolatey
run: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- name: Install OpenCover and Codecov
run: |
choco install opencover.portable -y
choco install codecov -y
- name: Install Chocolatey packages
uses: crazy-max/ghaction-chocolatey@v1
with:
args: 'install opencover.portable codecov -y'
- name: Build
run: msbuild Parse.sln /verbosity:minimal
run: dotnet build Parse.sln --configuration Debug --no-restore
- name: Run tests with coverage
run: |
OpenCover.Console.exe -target:dotnet.exe -targetargs:"test --test-adapter-path:. --logger:console /p:DebugType=full .\Parse.Tests\Parse.Tests.csproj" -filter:"+[Parse*]* -[Parse.Tests*]*" -oldstyle -output:parse_sdk_dotnet_coverage.xml -register:user
- name: Upload coverage to Codecov
run: codecov -f "parse_sdk_dotnet_coverage.xml"
OpenCover.Console.exe -target:dotnet.exe -targetargs:"test --configuration Debug --test-adapter-path:. --logger:console /p:DebugType=full .\Parse.Tests\Parse.Tests.csproj" -filter:"+[Parse*]* -[Parse.Tests*]*" -oldstyle -output:parse_sdk_dotnet_coverage.xml -register:user
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Upload artifacts
# if: always()
# uses: actions/upload-artifact@v2
Expand Down
4 changes: 4 additions & 0 deletions Parse/Infrastructure/Utilities/LateInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
using System.Collections.Generic;
using System.Linq;

#if DEBUG
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Parse.Tests")]
#endif

namespace Parse.Infrastructure.Utilities
{
/// <summary>
Expand Down

0 comments on commit 24f7bbe

Please sign in to comment.