
- By Emily Pipkin
- ·
- Posted 27 Mar 2023
Codurance Expands to Leeds with New Office Space
Codurance is excited to announce the opening of a new office in Leeds. This expansion will allow us to better serve our clients in the north of..
Code .
or open VSCode and then open the new directory you just created[Shift]
[Command/Ctrl]
[P]
and type F#
New Project
classlib
or console
or other project type for the production project[Shift]
[Command/Ctrl]
[P]
and type FAKE
Choose Default build
, you should see an output similar to this:
Checking Paket version (downloading latest stable)...
Paket.exe 3.33.5 is up to date.
Paket version 3.33.5
0 seconds - ready.
Building project with version: LocalBuild
Shortened DependencyGraph for Target Build:
<== Build
<== Clean
...
[Shift]
[Command/Ctrl]
[P]
and type F#
New Project
fsunit
for test codetest.fsproj
file[Shift]
[Command/Ctrl]
[P]
and type F#
Add Project Reference
test.fsproj
project as the project that you want to editproduction.fsproj
project as the reference you want to addVerify that test.fsproj
has been changed and contains a reference to production.fsproj
...
<ItemGroup>
<ProjectReference Include="../production/production.fsproj">
<Name>production.fsproj</Name>
<Project>{df896c20-dc7e-4d4d-90da-546d6154d641}</Project>
</ProjectReference>
</ItemGroup>
...
[Shift]
[Command/Ctrl]
[P]
and type paket
Add Nuget Package
Nunit.Console
Verify that paket.dependencies
gets updated with new dependency
source https://www.nuget.org/api/v2
nuget FAKE
nuget FSharp.Core
nuget FsUnit
nuget FsCheck
nuget nunit.console // <- !!!This line should be present!!!
Open build.fsx
Add open Fake.Testing
after open Fake
open Fake
open Fake.Testing // <--!!!Add this line!!!
Add the test task
let testAssemblies = !! (buildDir + "*Tests.dll") // <--!!!Add this line!!!
Target "UnitTests" (fun _ -> testAssemblies |> NUnit3 id) // <--!!!Add this line!!!
Add UnitTests to the build
"Clean"
==> "Build"
==> "UnitTests" // <--!!!Add this line!!!
==> "Deploy"
RunTargetOrDefault "Build"
Press [Shift]
[Command/Ctrl]
[P]
and type FAKE
build
Choose UnitTests
, you should see an output similar to this:
Checking Paket version (downloading latest stable)...
Paket.exe 3.33.5 is up to date.
Paket version 3.33.5
0 seconds - ready.
Building project with version: LocalBuild
Shortened DependencyGraph for Target UnitTests:
<== UnitTests
<== Build
<== Clean
...
Voila!
[Shift]
[Command/Ctrl]
[B]
Should show an error and you can choose to edit. Edit the configuration to run the build script
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "./build.sh", // <--!!!Modify this line to call your build script (build.sh on mac/linux) or (build.cmd on windows)!!!
"isShellCommand": true,
"args": [], // <--!!!Modify this line to remove arguments!!!
"showOutput": "always"
}
Press [Shift]
[Command/Ctrl]
[B]
, you should see an output similar to this:
Checking Paket version (downloading latest stable)...
Paket.exe 3.33.5 is up to date.
Paket version 3.33.5
0 seconds - ready.
Building project with version: LocalBuild
Shortened DependencyGraph for Target Build:
<== Build
<== Clean
...
Codurance is excited to announce the opening of a new office in Leeds. This expansion will allow us to better serve our clients in the north of..
What is a good engineering team culture, and how can we influence it? Around this topic was José Enrique Rodríguez Huerta's, Managing Director and..
Join our newsletter for expert tips and inspirational case studies
Your welcome email is on its way! You can pick the emails you’d like to receive by clicking the link to the Preference Centre.
Join our newsletter for expert tips and inspirational case studies
Your welcome email is on its way! You can pick the emails you’d like to receive by clicking the link to the Preference Centre.