Skip to content

Add cascading metadata #178

Add cascading metadata

Add cascading metadata #178

Workflow file for this run

#
# Copyright 2022 The Dapr Authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: conformance-test
env:
# Version of Go
GOVER: "1.20"
# Dapr Socket folder
DAPR_COMPONENT_SOCKETS_FOLDER: /tmp
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
env:
GOLANGCILINT_VER: v1.51.2
GO_VERSION: 1.20.x
GOOS: ${{ matrix.target_os }}
GOARCH: ${{ matrix.target_arch }}
GOPROXY: https://proxy.golang.org
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Build
run: go build -v ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.4.0
with:
version: ${{ env.GOLANGCILINT_VER }}
skip-cache: true
- name: Test
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
- name: Codecov
uses: codecov/codecov-action@v1
test:
strategy:
fail-fast: false
matrix:
include:
- component: bindings.kafka
type: bindings
cmd: go run examples/bindings.kafka/main.go &
socket: kafka-pluggable
operations: |
- create
- operations
metadata: |
publishTopic: binding-topic
topics: binding-topic
brokers: localhost:9092
consumerGroup: pubsubgroup1
authRequired: "false"
initialOffset: oldest
- component: pubsub.memory
type: pubsub
socket: memory-pluggable
cmd: go run examples/pubsub.memory/main.go &
operations: |
- publish
- subscribe
- multiplehandlers
- component: pubsub.redis
type: pubsub
socket: redis-pluggable
cmd: go run examples/pubsub.redis/main.go &
test_config: |
checkInOrderProcessing: false
operations: |
- publish
- subscribe
- multiplehandlers
metadata: |
redisHost: localhost:6379
redisPassword: ""
consumerID: "testConsumer"
processingTimeout: 5s
redeliverInterval: 1s
concurrency: 1
- component: pubsub.kafka
type: pubsub
socket: kafka-pluggable
cmd: go run examples/pubsub.kafka/main.go &
operations: |
- publish
- subscribe
- multiplehandlers
metadata: |
brokers: localhost:9092
consumerGroup: pubsubgroup1
authRequired: "false"
initialOffset: oldest
- component: state.redis
type: state
socket: redis-pluggable
cmd: go run examples/state.redis/main.go &
metadata: |
redisHost: localhost:6379
redisPassword: ""
queryIndexes: |
[
{
"name": "qIndx",
"indexes": [
{
"key": "message",
"type": "TEXT"
}
]
}
]
runs-on: ubuntu-latest
steps:
- name: setup go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOVER }}
- name: Check out code
uses: actions/checkout@v3
- name: Run ${{matrix.component}} dependencies
shell: bash
run: |
DEPENDENCIES=examples/${{matrix.component}}/docker-compose.dependencies.yml
if [ -e $DEPENDENCIES ]; then
docker-compose -f $DEPENDENCIES up -d
fi
- name: Run ${{matrix.component}} component
shell: bash
run: ${{ matrix.cmd }}
- name: Wait for socket
shell: bash
run: |
until [ -S ${{ env.DAPR_COMPONENT_SOCKETS_FOLDER }}/${{ matrix.socket }}.sock ]
do
sleep 5
echo ">>> waiting for socket creation... sleeping"
done
- name: Conformance Tests
uses: dapr-sandbox/action-components-conformance-test@v0.1.0
with:
socket: ${{ env.DAPR_COMPONENT_SOCKETS_FOLDER }}/${{ matrix.socket }}.sock
type: ${{ matrix.type }}
metadata: ${{ matrix.metadata }}
operations: ${{ matrix.operations }}
test_config: ${{ matrix.test_config }}