This demo is based on microsoft documentation and demonstrates how kotlin and Microsoft Azure Functions can work together.
🟢 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
- Java 17
- Maven >= 3.2
- Azure CLI
- Azure Functions Core Tools v4
$ 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
# 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