/azure-functions-kotlin-demo

Primary LanguageKotlinApache License 2.0Apache-2.0

Azure functions demo using Kotlin and Maven

CI with Maven License

This demo is based on microsoft documentation and demonstrates how kotlin and Microsoft Azure Functions can work together.

Technologies

🟢 Kotlin 1.7.x with Java 17
🟢 Maven
🟢 JUnit 5.x
🟢 Mockk mocking framework
🟢 Kotest Assertions assertion framework
🟢 Koin dependency injection framework
🔴 "Real" integration tests starting local azure functions container

Prerequisites

Clone repository and build project

$ git clone https://github.com/larmic/azure-functions-kotlin-demo

$ mvn clean test                    # Compiles codes and runs unit tests
$ mvn clean package                 # Like test but also build local artifact
$ mvn clean package -DskipTests     # Build local artifact but skips tests
$ mvn clean verify                  # Like package but also runs integration tests

Run functions locally

# start local functions container using azure-functions-maven-plugin
$ mvn azure-functions:run 

# debug local functions container
$ mvn azure-functions:run -DenableDebug

# http call
$ curl http://localhost:7071/api/hello?name=larmic