tests #9502
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: tests | |
on: | |
push: | |
branches: | |
- master | |
- release-* | |
pull_request: | |
workflow_dispatch: | |
# For detect flaky tests | |
schedule: | |
- cron: "45 * * * *" | |
jobs: | |
unit: | |
concurrency: | |
group: unit-${{ github.event_name }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} | |
cancel-in-progress: true | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: [1.21.x, 1.22.x, 1.23.x] | |
os: [ubuntu, windows, macOS] | |
env: | |
OS: ${{ matrix.os }}-latest | |
GO: ${{ matrix.go-version }} | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache: true | |
- name: Run tests | |
run: go test -race -coverprofile unit.txt -covermode atomic -v ./... | |
- name: Upload unit-tests coverage report to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
file: ./unit.txt | |
flags: unit,${{ matrix.os }},go-${{ matrix.go-version }} | |
name: unit | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
integration: | |
concurrency: | |
group: integration-${{ github.event_name }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}-${{ matrix.ydb-version }} | |
cancel-in-progress: true | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: [1.21.x, 1.22.x, 1.23.x] | |
ydb-version: [23.3, 24.1, 24.2] | |
os: [ubuntu] | |
services: | |
ydb: | |
image: ydbplatform/local-ydb:${{ matrix.ydb-version }} | |
ports: | |
- 2135:2135 | |
- 2136:2136 | |
- 8765:8765 | |
volumes: | |
- /tmp/ydb_certs:/ydb_certs | |
env: | |
YDB_LOCAL_SURVIVE_RESTART: true | |
YDB_USE_IN_MEMORY_PDISKS: true | |
YDB_TABLE_ENABLE_PREPARED_DDL: true | |
YDB_ENABLE_COLUMN_TABLES: true | |
options: '-h localhost' | |
env: | |
OS: ubuntu-latest | |
GO: ${{ matrix.go-version }} | |
YDB_VERSION: ${{ matrix.ydb-version }} | |
YDB_CONNECTION_STRING: grpc://localhost:2136/local | |
YDB_CONNECTION_STRING_SECURE: grpcs://localhost:2135/local | |
YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem | |
YDB_SESSIONS_SHUTDOWN_URLS: http://localhost:8765/actors/kqp_proxy?force_shutdown=all | |
HIDE_APPLICATION_OUTPUT: 1 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache: true | |
- name: Run tests | |
run: go test -race -tags integration -coverpkg=./... -coverprofile integration.txt -covermode atomic ./tests/integration | |
- name: Upload integration-tests coverage report to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
file: ./integration.txt | |
flags: integration,${{ matrix.os }},go-${{ matrix.go-version }},ydb-${{ matrix.ydb-version }} | |
name: integration | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
experiment: | |
concurrency: | |
group: experiment-${{ github.event_name }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}-${{ matrix.ydb-version }} | |
cancel-in-progress: true | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: [1.23.x] | |
ydb-version: [nightly] | |
os: [ubuntu] | |
services: | |
ydb: | |
image: ydbplatform/local-ydb:${{ matrix.ydb-version }} | |
ports: | |
- 2135:2135 | |
- 2136:2136 | |
- 8765:8765 | |
volumes: | |
- /tmp/ydb_certs:/ydb_certs | |
env: | |
YDB_LOCAL_SURVIVE_RESTART: true | |
YDB_USE_IN_MEMORY_PDISKS: true | |
YDB_TABLE_ENABLE_PREPARED_DDL: true | |
YDB_FEATURE_FLAGS: enable_topic_service_tx | |
YDB_ENABLE_COLUMN_TABLES: true | |
options: '-h localhost' | |
env: | |
OS: ubuntu-latest | |
GO: ${{ matrix.go-version }} | |
YDB_VERSION: ${{ matrix.ydb-version }} | |
YDB_CONNECTION_STRING: grpc://localhost:2136/local | |
YDB_CONNECTION_STRING_SECURE: grpcs://localhost:2135/local | |
YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem | |
YDB_SESSIONS_SHUTDOWN_URLS: http://localhost:8765/actors/kqp_proxy?force_shutdown=all | |
HIDE_APPLICATION_OUTPUT: 1 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache: true | |
- name: Run tests | |
run: go test -race -tags integration -coverpkg=./... -coverprofile experiment.txt -covermode atomic ./... | |
- name: Upload experimental-tests coverage report to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
file: ./experiment.txt | |
flags: experiment,${{ matrix.os }},go-${{ matrix.go-version }},ydb-${{ matrix.ydb-version }} | |
name: experiment | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |