worker: test: use constructor for tests #75
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
- push | |
- pull_request | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Docker | |
uses: docker-practice/actions-setup-docker@master | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.22.4" | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Start raccoon | |
run: make docker-run | |
- name: Run tests | |
run: go test ./... -v -coverprofile=coverage.out | |
env: | |
INTEGTEST_BOOTSTRAP_SERVER: 'localhost:9094' | |
INTEGTEST_HOST: 'localhost:8080' | |
INTEGTEST_TOPIC_FORMAT: 'clickstream-%s-log' | |
GRPC_SERVER_ADDR: 'localhost:8081' | |
PUBSUB_EMULATOR_HOST: 'localhost:8085' | |
LOCALSTACK_HOST: 'http://localhost:4566' | |
- name: Upload coverage data | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
path-to-profile: coverage.out | |
smoke-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.22.4" | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
- uses: actions/checkout@v2 | |
- name: Build | |
run: make build | |
- name: Smoke test | |
run: ./raccoon | |
benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.22.4" | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Invoking go bench test | |
run: make test-bench |