Skip to content

Commit bfad432

Browse files
author
Christof Senn
committed
enable locked nuget restores
1 parent be54f9f commit bfad432

16 files changed

Lines changed: 6467 additions & 9 deletions

File tree

‎.github/workflows/ci-tests.yml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
with:
2121
global-json-file: global.json
2222

23-
- name: Build framework
24-
run: dotnet build Remote.Linq.slnx
23+
- name: Restore framework
24+
run: dotnet restore Remote.Linq.slnx --locked-mode
2525

26-
- name: Build samples
27-
run: dotnet build Remote.Linq.Samples.sln
26+
- name: Build framework
27+
run: dotnet build Remote.Linq.slnx --no-restore
2828

2929
- name: Run tests with coverage
3030
run: >
@@ -52,3 +52,6 @@ jobs:
5252
token: ${{ secrets.CODECOV_TOKEN }}
5353
fail_ci_if_error: true
5454
verbose: true
55+
56+
- name: Build samples
57+
run: dotnet build Remote.Linq.Samples.sln

‎.github/workflows/publish.yml‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: Check version
4040
# assert version match with project version so only pre-release label can be changed based on release tag
41-
run: dotnet build Remote.Linq.slnx -t:CheckVersion -c Release -p BuildVersion="${{ steps.version.outputs.major_without_prefix }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}"
41+
run: dotnet build Remote.Linq.slnx --no-restore -t:CheckVersion -c Release -p BuildVersion="${{ steps.version.outputs.major_without_prefix }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}"
4242

4343
- name: Set version info
4444
run: |
@@ -56,10 +56,16 @@ jobs:
5656
echo "IsStable=$IsStable" >> $Env:GITHUB_ENV
5757
echo "Create release: v$Version"
5858
59+
- name: Restore
60+
run: dotnet restore Remote.Linq.slnx --locked-mode
61+
5962
- name: Build
60-
env:
61-
VSTEST_CONNECTION_TIMEOUT: 1200 # timeout 20 minutes
62-
run: dotnet test Remote.Linq.slnx -c Release /bl
63+
run: dotnet build Remote.Linq.slnx --no-restore -c Release /bl:build.binlog
64+
65+
- name: Test
66+
#env:
67+
# VSTEST_CONNECTION_TIMEOUT: 1200 # timeout 20 minutes
68+
run: dotnet test Remote.Linq.slnx --no-build -c Release
6369

6470
- name: Upload build log
6571
uses: actions/upload-artifact@v4

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ nuget.exe
2525
*.*sdf
2626
*.ipch
2727
*.sln.ide
28-
*.lock.json
2928
*.db
3029
.vs/
3130
config.test.json

‎Directory.Build.props‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
<PropertyGroup>
4646
<LangVersion Condition="'$(LangVersion)' == ''">14.0</LangVersion>
47+
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
4748
<GenerateDocumentationFile Condition="'$(GenerateDocumentationFile)' == ''">true</GenerateDocumentationFile>
4849
<TreatWarningsAsErrors Condition="'$(TreatWarningsAsErrors)' == ''">true</TreatWarningsAsErrors>
4950
<CodeAnalysisRuleSet Condition="'$(CodeAnalysisRuleSet)' == ''">$(MSBuildThisFileDirectory)Style.NoDoc.ruleset</CodeAnalysisRuleSet>

‎samples/Directory.Build.props‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />
55

66
<PropertyGroup>
7+
<RestorePackagesWithLockFile>false</RestorePackagesWithLockFile>
78
<NuGetAudit>false</NuGetAudit>
89
</PropertyGroup>
910

0 commit comments

Comments
 (0)