/
githubmirror
/
ydb-go-examples
Обзор
Документация
Войти
/
githubmirror
/
ydb-go-examples
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
.github/workflows/tests.yml
546 строк
16 KB
Aleksey Myasnikov
Merge pull request #30 from ydb-platform/gorm
02 фев 2023, 13:48
Не верифицирован
02 фев 2023, 13:48
9a6bae3
Код
Авторство
О чём код?
name: tests on: push: branches: - master pull_request: workflow_dispatch: jobs: basic_native: concurrency: group: basic_native-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./basic/native -ydb=${YDB_CONNECTION_STRING} -prefix=basic basic_database_sql: concurrency: group: basic_database_sql-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./basic/database_sql -ydb=${YDB_CONNECTION_STRING} -prefix=database/sql basic_gorm: concurrency: group: basic_gorm-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./basic/gorm bulk_upsert: concurrency: group: bulk_upsert-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./bulk_upsert -ydb=${YDB_CONNECTION_STRING} -prefix=bulk_upsert -count=1000 -table=bulk_upsert_example containers: concurrency: group: containers-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./containers -ydb=${YDB_CONNECTION_STRING} -prefix=containers ddl: concurrency: group: ddl-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./ddl -ydb=${YDB_CONNECTION_STRING} -prefix=ddl decimal: concurrency: group: decimal-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./decimal -ydb=${YDB_CONNECTION_STRING} -prefix=decimal serverless_healthcheck: concurrency: group: serverless_healthcheck-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./serverless/healthcheck -ydb=${YDB_CONNECTION_STRING} -prefix=healthcheck -count=1 -url=yandex.ru -url=google.com pagination: concurrency: group: pagination-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./pagination -ydb=${YDB_CONNECTION_STRING} -prefix=pagination partitioning_policies: concurrency: group: partitioning_policies-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./partitioning_policies -ydb=${YDB_CONNECTION_STRING} -prefix=partitioning_policies -table=partitioning_policies read_table: concurrency: group: read_table-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./read_table -ydb=${YDB_CONNECTION_STRING} -prefix=read_table ttl: concurrency: group: ttl-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./ttl -ydb=${YDB_CONNECTION_STRING} -prefix=ttl ttl_readtable: concurrency: group: ttl_readtable-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./ttl_readtable -ydb=${YDB_CONNECTION_STRING} -prefix=ttl_readtable serverless_url_shortener: concurrency: group: serverless_url_shortener-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./serverless/url_shortener -ydb=${YDB_CONNECTION_STRING} -prefix=url_shortener -port=8888 -shutdown-after=55s -log-level=warn describe: concurrency: group: describe-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} cancel-in-progress: true strategy: matrix: go-version: [1.19.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go run ./describe -ydb=${YDB_CONNECTION_STRING}