You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+52-5
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,71 @@
1
1
## Running the latest runtime version
2
-
### Dependencies
2
+
3
+
## Dependencies
3
4
4
5
There is a dependency on the .NET Core tools for the cross platform support. You can [install these here](https://www.microsoft.com/net/core).
5
6
6
7
To install the required dotnet packages navigate into the repository root and run `dotnet restore`
7
8
8
-
### Compiling the CLI Tools
9
+
## Compiling the CLI Tools
10
+
9
11
To build the project run `cd src/Azure.Functions.Cli; dotnet build` (note navigating into the src directory is required due to the test suite currently failing to compile on non-windows environments - see below)
10
12
11
13
### Running against a function app
14
+
12
15
To test this project against a local function app you can run from that function app's directory
13
16
14
17
`dotnet run --project PATH_TO_FUNCTIONS_CLI/src/Azure.Functions.Cli start`
15
18
16
19
where PATH_TO_FUNCTIONS_CLI is the absolute or relative path to the root of this repository.
17
20
18
-
## Running the Test Suite
19
-
You cannot run the test suite at this moment in time using DotNet Core. We will update this file when this becomes possible.
21
+
### Running the Test Suite
22
+
23
+
- Build the solution `dotnet build Azure.Functions.Cli.sln`
24
+
- As part of this build, the cli is copied into the test project's output directory (`test/Azure.Functions.Cli.Tests/bin/Debug/net8.0`) - this is what will be used by the tests
25
+
- If you wish to override this, you can set the `FUNC_PATH` environment variable to the path of the `func`/`func.exe` you wish to test against
26
+
- Run the test suite in Visual Studio Test Explorer or by running `dotnet test` from the `test` project root.
27
+
- i.e. `cd test/Azure.Functions.Cli.Tests; dotnet test`
28
+
29
+
#### Storage Emulator
30
+
31
+
Some tests, namely E2E, require an Azure storage emulator to be running. You can download the storage emulator [here](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=visual-studio%2Cblob-storage).
32
+
33
+
Run the emulator before your run the tests.
34
+
35
+
> There is a script you can use for this as well, see `tools/start-emulators.ps1`
36
+
37
+
#### Templates missing
38
+
39
+
If you see an error saying the templates folder is missing, you can follow either of the following steps:
40
+
41
+
##### (a)
42
+
43
+
- Find your offical func instation directory
44
+
- i.e. `/opt/homebrew/Cellar/azure-functions-core-tools@4/4.0.6610`
45
+
- or `%LOCALAPPDATA%\AzureFunctionsTools\Releases\4.69.0\cli_x64\`
46
+
- Copy the templates folder to the test project's output directory (`test/Azure.Functions.Cli.Tests/bin/Debug/net8.0`)
47
+
48
+
##### or (b)
49
+
50
+
- Update `build/Program.cs` to just add the template nugets and json:
Ifyoudon't know what a pull request is read this https://help.github.com/articles/using-pull-requests.
33
80
34
81
Beforewecanacceptyourpull-requestyou'll need to sign a [Contribution License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement). You can sign ours [here](https://cla2.dotnetfoundation.org). However, you don'thavetodothisup-front. Youcansimplyclone, fork, andsubmityourpull-requestasusual.
0 commit comments