Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ steps:
- docker-compose#v3.0.0:
run: integ-test-grpc
config: docker/buildkite/docker-compose.yml

# TODO: delete this file after migration to github actions
2 changes: 2 additions & 0 deletions .buildkite/scripts/fossa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ EXIT_STATUS=$?

echo "fossa script exits with status $EXIT_STATUS"
exit $EXIT_STATUS

# TODO: delete this file after migration to github actions
2 changes: 2 additions & 0 deletions .buildkite/scripts/gen_coverage_metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ echo "commit-sha: $BUILDKITE_COMMIT" > "$output_path"
echo "timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$output_path"

echo "Coverage metadata written to $output_path"

# TODO: delete this file after migration to github actions
147 changes: 147 additions & 0 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: CI Checks
on:
push:
pull_request:

jobs:
golang-unit-test:
name: Golang unit test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0 # get full history for branch checking

- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: '1.23.4'

- name: Run unit test
run: docker compose -f docker/github_actions/docker-compose.yml run unit-test bash -c "make unit_test && ./scripts/gen_coverage_metadata.sh .build/metadata.txt"

- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
with:
name: go-unit-test-coverage
path: |
.build/*/coverage/*.out
.build/cover.out
.build/metadata.txt
include-hidden-files: true

golangci-lint-validate-code-is-clean:
name: Golangci lint validate code is clean
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0 # get full history for branch checking

- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: '1.23.4'

- name: Run golint
run: docker compose -f docker/github_actions/docker-compose.yml run unit-test bash -c "./scripts/golint.sh"

golang-integration-test-sticky-off:
name: Golang integration test sticky off
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0 # get full history for branch checking

- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: '1.23.4'

- name: Run integration test sticky off
uses: nick-fields/retry@v3
with:
max_attempts: 2
timeout_minutes: 30
command: |
docker compose -f docker/github_actions/docker-compose.yml run integ-test bash -c "make integ_test_sticky_off"

- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
with:
name: go-integration-sticky-off-coverage
path: .build/*/coverage/*.out
include-hidden-files: true

golang-integration-test-sticky-on:
name: Golang integration test sticky on
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0 # get full history for branch checking

- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: '1.23.4'

- name: Run integration test sticky on
uses: nick-fields/retry@v3
with:
max_attempts: 2
timeout_minutes: 30
command: |
docker compose -f docker/github_actions/docker-compose.yml run integ-test bash -c "make integ_test_sticky_on"

- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
with:
name: go-integration-sticky-on-coverage
path: .build/*/coverage/*.out
include-hidden-files: true

golang-integration-test-grpc:
name: Golang integration test gRPC adapter
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0 # get full history for branch checking

- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: '1.23.4'

- name: Run integration test gRPC
uses: nick-fields/retry@v3
with:
max_attempts: 2
timeout_minutes: 30
command: |
docker compose -f docker/github_actions/docker-compose.yml run integ-test-grpc bash -c "make integ_test_grpc"

- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
with:
name: go-integration-grpc-coverage
path: .build/*/coverage/*.out
include-hidden-files: true

2 changes: 2 additions & 0 deletions docker/buildkite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ RUN echo \
"deb [signed-by=/usr/share/keyrings/buildkite-agent-archive-keyring.gpg] https://apt.buildkite.com/buildkite-agent stable main" | \
tee /etc/apt/sources.list.d/buildkite-agent.list
RUN apt-get update && apt-get install -yy --no-install-recommends buildkite-agent

# TODO: delete this file after migration to github actions
2 changes: 2 additions & 0 deletions docker/buildkite/docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,5 @@ networks:
services-network:
name: services-network
driver: bridge

# TODO: delete this file after migration to github actions
2 changes: 2 additions & 0 deletions docker/buildkite/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,5 @@ networks:
services-network:
name: services-network
driver: bridge

# TODO: delete this file after migration to github actions
10 changes: 10 additions & 0 deletions docker/github_actions/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM golang:1.24

RUN mkdir -p /go/src/go.uber.org/cadence
WORKDIR /go/src/go.uber.org/cadence

ADD go.mod go.sum /go/src/go.uber.org/cadence/

# allow git-status and similar to work
RUN git config --global --add safe.directory /go/src/go.uber.org/cadence
RUN GO111MODULE=on go mod download
149 changes: 149 additions & 0 deletions docker/github_actions/docker-compose-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
version: "3.5"

services:
cassandra:
image: cassandra:4.1.3
ports:
- "9042:9042"
networks:
services-network:
aliases:
- cassandra

statsd:
image: hopsoft/graphite-statsd
ports:
- "8080:80"
- "2003:2003"
- "8125:8125"
- "8126:8126"
networks:
services-network:
aliases:
- statsd

cadence:
image: ubercadence/server:master-auto-setup
ports:
- "7933:7933"
- "7833:7833"
- "7934:7934"
- "7935:7935"
- "7939:7939"
environment:
- "CASSANDRA_SEEDS=cassandra"
- "STATSD_ENDPOINT=statsd:8125"
- "DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml"
depends_on:
- cassandra
- statsd
networks:
services-network:
aliases:
- cadence

integ-test-sticky-off:
build:
context: ../../
dockerfile: ./docker/github_actions/Dockerfile
command:
- /bin/sh
- -e
- -c
- |
make integ_test_sticky_off
environment:
- "SERVICE_ADDR=cadence:7933"
- "GO111MODULE=on"
depends_on:
- cadence
volumes:
- ../../:/go/src/go.uber.org/cadence
networks:
services-network:
aliases:
- integ-test-sticky-off

integ-test-sticky-on:
build:
context: ../../
dockerfile: ./docker/github_actions/Dockerfile
command:
- /bin/sh
- -e
- -c
- |
make integ_test_sticky_on
environment:
- "SERVICE_ADDR=cadence:7933"
- "GO111MODULE=on"
depends_on:
- cadence
volumes:
- ../../:/go/src/go.uber.org/cadence
networks:
services-network:
aliases:
- integ-test-sticky-on

integ-test-grpc:
build:
context: ../../
dockerfile: ./docker/github_actions/Dockerfile
command:
- /bin/sh
- -e
- -c
- |
make integ_test_grpc
environment:
- "SERVICE_ADDR=cadence:7833"
- "ENABLE_GRPC_ADAPTER=true"
- "GO111MODULE=on"
depends_on:
- cadence
volumes:
- ../../:/go/src/go.uber.org/cadence
networks:
services-network:
aliases:
- integ-test-grpc

unit-test:
build:
context: ../../
dockerfile: ./docker/github_actions/Dockerfile
command:
- /bin/sh
- -e
- -c
- |
make unit_test
environment:
- "GO111MODULE=on"
volumes:
- ../../:/go/src/go.uber.org/cadence
networks:
services-network:
aliases:
- unit-test

coverage-report:
build:
context: ../../
dockerfile: ./docker/github_actions/Dockerfile
command:
- /bin/sh
- -e
- -c
- |
make coverage_report
environment:
- "GO111MODULE=on"
volumes:
- ../../:/go/src/go.uber.org/cadence

networks:
services-network:
name: services-network
driver: bridge
Loading
Loading