Skip to content

Commit

Permalink
divided into different jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-shchetinin committed Jul 23, 2024
1 parent 627d363 commit d91aa95
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 71 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
main:
name: Examples
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: Launch basic example
shell: bash
run: |
cd ../build
examples/basic_example/basic_example -e localhost:2136 -d /local -p /local/basic
examples/bulk_upsert_simple/bulk_upsert_simple -e localhost:2136 -d /local -p /local/bulk
examples/pagination/pagination -e localhost:2136 -d /local -p /local/pagination
examples/ttl/ttl -e localhost:2136 -d /local -p /local/ttl
71 changes: 0 additions & 71 deletions .github/workflows/pr_check.yaml

This file was deleted.

82 changes: 82 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: PR-check

on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
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
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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 }}

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]
services:
ydb:
image: ydbplatform/local-ydb:${{ matrix.ydb-version }}
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'
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 code
uses: actions/checkout@v4
- 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 }}

0 comments on commit d91aa95

Please sign in to comment.