Skip to content

Development Environment

Alexander Klee edited this page Aug 27, 2021 · 15 revisions

Tools

All developers should have tools mentioned here installed on their machine.

Environment Variables

Make sure the following environment variables are configured on your local machine

Key Supported values
NETCORE_ENVIRONMENT development, staging, production
BFCLI_API_KEY https://blockfrost.io/dashboard
BFCLI_NETWORK mainnet, testnet ipfs

Git setup

In case you have never worked with Git before you may want to read Getting Started - First-Time Git Setup in the Pro Git book.

If you need a refresh you are not well-versed with Git then you can read the tutorial.

Git user configuration

Make sure you have configured your user with Git. This is important because Git will use this information in every commit you make.

git config --global user.name "Your Fullname"
git config --global user.email "Your  Email"

Git editor configuration

You can tell Git which editor you like to use when it needs you to type in a message.

git config --global core.editor <your_favourite_editor>

How to configure your_favourite_editor

Connecting to Github using SSH

Refer to this link to setup SSH for your Github account.

Clone the application

Fork the repo

Fork the repository and clone it using the following command.

git clone git@github.com:<your-github-user>/blockfrost-dotnet.git
cd blockfrost-dotnet/
git status

You can contribute to the source repository without creating a fork. You loose this Although you loose some flexibility though because You will miss out on some neat GitHub features provides on forked repositories

Build and Test your code

Check your dotnet version

$ dotnet --version
5.0.400

Verify the output meets the requirements

Build and test

You can build and test the codebase using the following commands.

dotnet build
dotnet test --no-build --filter FullyQualifiedName!~Integration

The --filter option excludes the integration tests.

Running the integration tests is only advisable if

  • You are a 🤖
  • You are a 🦄
  • You like it when numbers go 📈

We should disable Integration Tests and trigger them on a special CI pipeline... You can open an issue if you read this.