# CI workflow across OpenFunction
## Goals
For rapid and automated verification of the overall functionality of OpenFunction including its own components and dependent components.
## Directory Structure
```
.
|-- ci/
| |-- build_go_function.sh
| |-- create_go_builder.sh
| `-- test_go_function.sh
|-- samples/
| `-- go/
| `-- async-bindings/
| |-- cron-input-kafka-output/
| | |-- cron-input-kafka-output.go
| | `-- go.mod
| |-- kafka-input/
| | |-- kafka-input.go
| | `-- go.mod
| `-- manifests.yaml
`-- src/
|-- builder # OpenFunction/builder
`-- ofn # OpenFunction/OpenFunction
```
## Process
### checkout
1. download the OpenFunction repository to `src/` directory (named `ofn`)
2. download the builder repository to the `src/` directory (named `builder`)
3. download the cli repository to the `src/` directory (named `cli`)
### build
1. build and push the builder image for each programing language
2. build and push the function image for each test case
3. build the cli tool, and output the ofn binary to the bin/ directory (named `ofn`)
### setup
1. setup kubernetes cluster
2. install openfunction and dependencies (we can verify the installation at the same time)
### test
For each programing language, complete the following validations.
1. sync-runtime function (http, cloudevent, multi route)
2. async-runtime function (bindings, pubsub, state)
3. plugins
4. events
## Rules
1. provide a bot for receiving CI requests and launch the corresponding CI workflow based on the parameters of the request
2. overall testing is required prior to release
## Command
We can trigger the CI workflow via the "issue comment" event.
1. Trigger the all processes (including `build` and `verify`)
```shell
--all
```
2. Trigger the image building process for all programming languages (including builder images and function images)
```shell
build --all
```
3. Trigger the builder image building process for the specify programming language
```shell
build --task builder --runtime go
```
4. Trigger the verification process for all programming languages
```shell
verify --all
```
5. Trigger the verification process for the specified case for the specified programming language
```shell
verify --case async-bindings --runtime go
```