Skip to content

Commit d91aa95

Browse files
divided into different jobs
1 parent 627d363 commit d91aa95

File tree

3 files changed

+108
-71
lines changed

3 files changed

+108
-71
lines changed

.github/workflows/examples.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
main:
2+
name: Examples
3+
runs-on: ubuntu-22.04
4+
services:
5+
ydb:
6+
image: ydbplatform/local-ydb:latest
7+
ports:
8+
- 2135:2135
9+
- 2136:2136
10+
- 8765:8765
11+
volumes:
12+
- /tmp/ydb_certs:/ydb_certs
13+
env:
14+
YDB_LOCAL_SURVIVE_RESTART: true
15+
YDB_USE_IN_MEMORY_PDISKS: true
16+
YDB_TABLE_ENABLE_PREPARED_DDL: true
17+
options: '-h localhost'
18+
steps:
19+
- name: Launch basic example
20+
shell: bash
21+
run: |
22+
cd ../build
23+
examples/basic_example/basic_example -e localhost:2136 -d /local -p /local/basic
24+
examples/bulk_upsert_simple/bulk_upsert_simple -e localhost:2136 -d /local -p /local/bulk
25+
examples/pagination/pagination -e localhost:2136 -d /local -p /local/pagination
26+
examples/ttl/ttl -e localhost:2136 -d /local -p /local/ttl

.github/workflows/pr_check.yaml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/tests.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: PR-check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
12+
cancel-in-progress: true
13+
jobs:
14+
unit:
15+
concurrency:
16+
group: unit-${{ github.ref }}-${{ matrix.os }}-${{ matrix.go-version }}
17+
cancel-in-progress: true
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu, macOS]
22+
env:
23+
OS: ${{ matrix.os }}-latest
24+
runs-on: ${{ matrix.os }}-latest
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
- name: Run tests
29+
run: ctest -j32 --preset release-unit
30+
- name: Upload unit-tests coverage report to Codecov
31+
uses: codecov/codecov-action@v4
32+
with:
33+
file: ./unit.txt
34+
flags: unit,${{ matrix.os }},go-${{ matrix.go-version }}
35+
name: unit
36+
env:
37+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
38+
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+
ydb-version: [23.3, 24.1]
48+
services:
49+
ydb:
50+
image: ydbplatform/local-ydb:${{ matrix.ydb-version }}
51+
ports:
52+
- 2135:2135
53+
- 2136:2136
54+
- 8765:8765
55+
volumes:
56+
- /tmp/ydb_certs:/ydb_certs
57+
env:
58+
YDB_LOCAL_SURVIVE_RESTART: true
59+
YDB_USE_IN_MEMORY_PDISKS: true
60+
YDB_TABLE_ENABLE_PREPARED_DDL: true
61+
options: '-h localhost'
62+
env:
63+
OS: ubuntu-latest
64+
YDB_VERSION: ${{ matrix.ydb-version }}
65+
YDB_CONNECTION_STRING: grpc://localhost:2136/local
66+
YDB_CONNECTION_STRING_SECURE: grpcs://localhost:2135/local
67+
YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem
68+
YDB_SESSIONS_SHUTDOWN_URLS: http://localhost:8765/actors/kqp_proxy?force_shutdown=all
69+
HIDE_APPLICATION_OUTPUT: 1
70+
steps:
71+
- name: Checkout code
72+
uses: actions/checkout@v4
73+
- name: Run tests
74+
run: ctest -j32 --preset release-integration
75+
- name: Upload integration-tests coverage report to Codecov
76+
uses: codecov/codecov-action@v4
77+
with:
78+
file: ./integration.txt
79+
flags: integration,${{ matrix.os }},go-${{ matrix.go-version }},ydb-${{ matrix.ydb-version }}
80+
name: integration
81+
env:
82+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)