Skip to content

Setup Development Environment

Chandni Patel edited this page May 28, 2024 · 7 revisions

Prerequisites

  1. Node 20.x LTS
  2. Git
  3. Owner-role access to this repository

Instructions

  1. Fork this GitHub Action repository into your own namespace
  2. Clone your own repo by git clone https://github.com/<your_namespace>/functions-action.git
  3. Change your directory cd functions-action
  4. Install node dependencies npm install

WARNING: In the current state of the repo, the action is not able to run locally.

How to update source code

Head to ./src and focus on changing the *.ts file. After that, ensure new unit test cases are added in ./tests folder by changing those *.spec.ts files.

How to run unittest cases

  1. To run all tests across all different cases: npm run test
  2. To run unit tests on a specific file: npm run test-file <file_path> (e.g. npm run test-file .\tests\utils\client.spec.ts)

How to setup e2e test cases

  1. Please review or add the sample apps in .\tests\e2e\ folder.
  2. Please review or modify workflow files in .\.github\workflows\run-e2e-tests-*.yml.
    1. Change AZURE_FUNCTIONAPP_NAME to the one you created.
    2. Change ${{ secrets.GAE_FA_DOTNET3_LCON }} to the one secret created in your GitHub repository.
    3. Create a secret GAE_FA_DOTNET3_LCON in your GitHub repository. Copy the publish profile xml context into its value.
  3. Every time when you push to dev branch or master branch, the E2E tests now should be triggered.

WARNING: When creating the pull request to Azure/functions-action, remember to remove the E2E workflow .yml files

Clone this wiki locally