/
githubmirror
/
ydb-php-sdk
Обзор
Документация
Войти
/
githubmirror
/
ydb-php-sdk
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/tests.yml
85 строк
2 KB
Oleg Ovcharuk
Collect and upload test coverage to Codecov
30 июн 2026, 21:59
30 июн 2026, 21:59
b4fe7ea
Код
Авторство
О чём код?
name: tests on: pull_request: push: branches: [ main ] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: read jobs: tests: services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:${{ matrix.ydb-versions }} ports: - 2135:2135 - 2136:2136 - 8765:8765 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' runs-on: ubuntu-latest strategy: fail-fast: false matrix: php-versions: [ '7.2', '7.4', '8.0', '8.2' ] ydb-versions: ['stable-22-5', 'trunk', '23.3', '23.2', '23.1'] steps: - uses: actions/checkout@v3 name: Checkout - uses: eWaterCycle/setup-grpc@v5 name: Setup gRPC with: grpc-version: 1.51.1 - uses: shivammathur/setup-php@v2 name: Setup PHP id: php with: extensions: grpc php-version: ${{ matrix.php-versions }} coverage: xdebug - run: composer validate --strict name: Validate composer.json and composer.lock - uses: actions/cache@v3 name: Cache Composer packages id: composer-cache with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} restore-keys: | ${{ runner.os }}-php- - name: Install dependencies run: composer install --prefer-dist --no-progress - name: Create YDB User run: docker exec $(docker ps --latest --quiet) /ydb -e grpc://localhost:2136 -d /local scripting yql -s "CREATE USER testuser PASSWORD 'testpassword'" - name: Run tests run: | ./vendor/bin/phpunit \ --coverage-text \ --coverage-clover=coverage.xml \ --whitelist src \ --testdox \ tests - name: Upload coverage to Codecov if: matrix.php-versions == '8.2' && matrix.ydb-versions == 'trunk' uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml fail_ci_if_error: false