Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-shchetinin committed Jul 23, 2024
1 parent c7f5b3a commit e84030e
Showing 1 changed file with 74 additions and 96 deletions.
170 changes: 74 additions & 96 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit e84030e

Please sign in to comment.