Skip to content

Commit 24f7bbe

Browse files
authored
ci: Fix workflow (#370)
1 parent 55eaea2 commit 24f7bbe

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,40 @@ on:
88
paths-ignore:
99
- '**/**.md'
1010
jobs:
11-
build:
11+
check-ci:
1212
runs-on: windows-latest
1313
steps:
1414
- name: Checkout repository
1515
uses: actions/checkout@v4
16-
- name: Set up NuGet
17-
uses: NuGet/setup-nuget@v1.1.1
16+
- name: Set up .NET SDK
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: '5.0.x'
20+
- name: Cache NuGet packages
21+
uses: actions/cache@v2
22+
with:
23+
path: |
24+
~/.nuget/packages
25+
~/.local/share/NuGet/Cache
26+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
27+
restore-keys: |
28+
${{ runner.os }}-nuget-
1829
- name: Restore NuGet packages
1930
run: nuget restore Parse.sln
20-
- name: Install Chocolatey
21-
run: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
22-
- name: Install OpenCover and Codecov
23-
run: |
24-
choco install opencover.portable -y
25-
choco install codecov -y
31+
- name: Install Chocolatey packages
32+
uses: crazy-max/ghaction-chocolatey@v1
33+
with:
34+
args: 'install opencover.portable codecov -y'
2635
- name: Build
27-
run: msbuild Parse.sln /verbosity:minimal
36+
run: dotnet build Parse.sln --configuration Debug --no-restore
2837
- name: Run tests with coverage
2938
run: |
30-
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
31-
- name: Upload coverage to Codecov
32-
run: codecov -f "parse_sdk_dotnet_coverage.xml"
39+
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
40+
- name: Upload code coverage
41+
uses: codecov/codecov-action@v4
42+
with:
43+
fail_ci_if_error: true
44+
token: ${{ secrets.CODECOV_TOKEN }}
3345
# - name: Upload artifacts
3446
# if: always()
3547
# uses: actions/upload-artifact@v2

Parse/Infrastructure/Utilities/LateInitializer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
using System.Collections.Generic;
33
using System.Linq;
44

5+
#if DEBUG
6+
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Parse.Tests")]
7+
#endif
8+
59
namespace Parse.Infrastructure.Utilities
610
{
711
/// <summary>

0 commit comments

Comments
 (0)