github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/.github/workflows/tests.yml (about)

     1  name: tests
     2  on:
     3    push:
     4      branches:
     5        - master
     6        - release-*
     7    pull_request:
     8    workflow_dispatch:
     9  jobs:
    10    unit:
    11      concurrency:
    12        group: unit-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}
    13        cancel-in-progress: true
    14      strategy:
    15        fail-fast: false
    16        matrix:
    17          go-version: [1.21.x, 1.22.x]
    18          os: [ubuntu, windows, macOS]
    19      env:
    20        OS: ${{ matrix.os }}-latest
    21        GO: ${{ matrix.go-version }}
    22      runs-on: ${{ matrix.os }}-latest
    23      steps:
    24        - name: Checkout code
    25          uses: actions/checkout@v3
    26        - name: Install Go
    27          uses: actions/setup-go@v3
    28          with:
    29            go-version: ${{ matrix.go-version }}
    30            cache: true
    31        - name: Test
    32          run: go test -race -coverprofile unit.txt -covermode atomic ./...
    33        - name: Upload coverage report to Codecov
    34          uses: codecov/codecov-action@v3
    35          with:
    36            file: ./unit.txt
    37            flags: unit,${{ matrix.os }},go-${{ matrix.go-version }}
    38            name: unit
    39    integration:
    40      concurrency:
    41        group: integration-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}-${{ matrix.ydb-version }}
    42        cancel-in-progress: true
    43      runs-on: ubuntu-latest
    44      strategy:
    45        fail-fast: false
    46        matrix:
    47          go-version: [1.21.x, 1.22.x]
    48          ydb-version: [23.3, 24.1]
    49      services:
    50        ydb:
    51          image: ydbplatform/local-ydb:${{ matrix.ydb-version }}
    52          ports:
    53            - 2135:2135
    54            - 2136:2136
    55            - 8765:8765
    56          volumes:
    57            - /tmp/ydb_certs:/ydb_certs
    58          env:
    59            YDB_LOCAL_SURVIVE_RESTART: true
    60            YDB_USE_IN_MEMORY_PDISKS: true
    61            YDB_TABLE_ENABLE_PREPARED_DDL: true
    62          options: '-h localhost'
    63      env:
    64        OS: ubuntu-latest
    65        GO: ${{ matrix.go-version }}
    66        YDB_VERSION: ${{ matrix.ydb-version }}
    67        YDB_CONNECTION_STRING: grpc://localhost:2136/local
    68        YDB_CONNECTION_STRING_SECURE: grpcs://localhost:2135/local
    69        YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem
    70        YDB_SESSIONS_SHUTDOWN_URLS: http://localhost:8765/actors/kqp_proxy?force_shutdown=all
    71        HIDE_APPLICATION_OUTPUT: 1
    72      steps:
    73        - name: Checkout code
    74          uses: actions/checkout@v3
    75        - name: Install Go
    76          uses: actions/setup-go@v3
    77          with:
    78            go-version: ${{ matrix.go-version }}
    79            cache: true
    80        - name: Integration test
    81          run: go test -race -tags integration -coverpkg=./... -coverprofile integration-secure.txt -covermode atomic ./tests/integration
    82        - name: Upload Test secure connection coverage report to Codecov
    83          uses: codecov/codecov-action@v3
    84          with:
    85            file: ./integration-secure.txt
    86            flags: integration,${{ matrix.os }},go-${{ matrix.go-version }},ydb-${{ matrix.ydb-version }}
    87            name: integration-secure