From e84030e8d50df25f39a8ed0588b8c5de88ba5683 Mon Sep 17 00:00:00 2001 From: st-shchetinin Date: Tue, 23 Jul 2024 19:25:33 +0300 Subject: [PATCH] fix tests --- .github/workflows/tests.yaml | 170 +++++++++++++++-------------------- 1 file changed, 74 insertions(+), 96 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index af82c50c75..7bba6352e3 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -12,70 +12,62 @@ concurrency: cancel-in-progress: true jobs: unit: - concurrency: - group: unit-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }} - cancel-in-progress: true - strategy: - fail-fast: false - matrix: - os: [ubuntu, macOS] - env: - OS: ${{ matrix.os }}-latest - runs-on: ${{ matrix.os }}-latest + name: PR check for YDB C++ SDK + runs-on: ubuntu-22.04 + services: + ydb: + image: ydbplatform/local-ydb:latest + 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 + options: '-h localhost' steps: - - name: Checkout PR + - name: Checkout PR uses: actions/checkout@v3 if: github.event.pull_request.head.sha != '' with: submodules: true ref: ${{ github.event.pull_request.head.sha }} - - name: Checkout - uses: actions/checkout@v3 - if: github.event.pull_request.head.sha == '' - with: - submodules: true - - name: Install dependencies - uses: ./.github/actions/prepare_vm - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - name: Restore cache files - uses: actions/cache/restore@v4 - with: - path: ~/.ccache - key: ubuntu-22.04-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: | - ubuntu-22.04-ccache- - - name: Build - uses: ./.github/actions/build - - name: Test - shell: bash - - name: Run tests - run: ctest -j32 --preset release-unit - - 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 }} + - name: Checkout + uses: actions/checkout@v3 + if: github.event.pull_request.head.sha == '' + with: + submodules: true + - name: Install dependencies + uses: ./.github/actions/prepare_vm + - name: Prepare ccache timestamp + id: ccache_cache_timestamp + shell: cmake -P {0} + run: | + string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) + message("::set-output name=timestamp::${current_date}") + - name: Restore cache files + uses: actions/cache/restore@v4 + with: + path: ~/.ccache + key: ubuntu-22.04-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} + restore-keys: | + ubuntu-22.04-ccache- + - name: Build + uses: ./.github/actions/build + - name: Test + shell: bash + run: | + ctest -j32 --preset release-unit - integration: - concurrency: - group: integration-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}-${{ matrix.ydb-version }} - cancel-in-progress: true - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - ydb-version: [23.3, 24.1] + integrtion: + name: PR check for YDB C++ SDK + runs-on: ubuntu-22.04 services: ydb: - image: ydbplatform/local-ydb:${{ matrix.ydb-version }} + image: ydbplatform/local-ydb:latest ports: - 2135:2135 - 2136:2136 @@ -87,50 +79,36 @@ jobs: YDB_USE_IN_MEMORY_PDISKS: true YDB_TABLE_ENABLE_PREPARED_DDL: true options: '-h localhost' - env: - OS: ubuntu-latest - 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 PR + - name: Checkout PR uses: actions/checkout@v3 if: github.event.pull_request.head.sha != '' with: submodules: true ref: ${{ github.event.pull_request.head.sha }} - - name: Checkout - uses: actions/checkout@v3 - if: github.event.pull_request.head.sha == '' - with: - submodules: true - - name: Install dependencies - uses: ./.github/actions/prepare_vm - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - name: Restore cache files - uses: actions/cache/restore@v4 - with: - path: ~/.ccache - key: ubuntu-22.04-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} - restore-keys: | - ubuntu-22.04-ccache- - - name: Build - uses: ./.github/actions/build - - name: Run tests - run: ctest -j32 --preset release-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 }} + - name: Checkout + uses: actions/checkout@v3 + if: github.event.pull_request.head.sha == '' + with: + submodules: true + - name: Install dependencies + uses: ./.github/actions/prepare_vm + - name: Prepare ccache timestamp + id: ccache_cache_timestamp + shell: cmake -P {0} + run: | + string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) + message("::set-output name=timestamp::${current_date}") + - name: Restore cache files + uses: actions/cache/restore@v4 + with: + path: ~/.ccache + key: ubuntu-22.04-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}} + restore-keys: | + ubuntu-22.04-ccache- + - name: Build + uses: ./.github/actions/build + - name: Test + shell: bash + run: | + ctest -j32 --preset release-integration