Skip to content

Commit

Permalink
scripts: adding sanity check
Browse files Browse the repository at this point in the history
The sanity check script requires the packages directory, so
i had to create this configuration file otherwise the
following error would occur:

```
Run dotnet fsi scripts/sanitycheck.fsx
8 nuget packages found for solution conventions.sln
System.Exception: 'packages' subdir under solution dir /__w/conventions/conventions/packages doesn't exist, run `make` first
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1439.Invoke(String message) in /build/dotnet6-FDnqMS/dotnet6-6.0.123/src/fsharp/artifacts/source-build/self/src/src/fsharp/FSharp.Core/printf.fs:line 1439
   at FSI_0007.findMissingPackageDirs@244(DirectoryInfo solDir, FSharpMap`2 idealPackageDirs)
   at FSI_0007.sanityCheckNugetPackagesFromSolution@120(FileInfo sol)
   at FSI_0007.SanityCheckNugetPackages()
   at <StartupCode$FSI_0007>.$FSI_0007.main@()
Stopped due to error
Error: Process completed with exit code 1.
```
  • Loading branch information
Mersho committed Oct 30, 2023
1 parent b32e017 commit 7e22ec8
Show file tree
Hide file tree
Showing 3 changed files with 592 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ jobs:
run: dotnet fsi scripts/inconsistentVersionsInFSharpScripts.fsx
- name: Check there are no non-verbose flags in scripts and CI YML files
run: dotnet fsi scripts/nonVerboseFlagsInGitHubCIAndScripts.fsx
- name: Sanity check nuget packages
run: |
dotnet restore
dotnet fsi scripts/sanityCheckNuget.fsx
- name: Install prettier
run: npm install prettier@2.8.3
- name: Change file permissions
Expand Down
7 changes: 7 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<!-- TODO: file a VS4Mac bug about this below setting making the tests disappear from the Tests view -->
<add key="globalPackagesFolder" value="packages" />
</config>
</configuration>
Loading

0 comments on commit 7e22ec8

Please sign in to comment.