/
githubmirror
/
ydb-go-sql
Обзор
Документация
Войти
/
githubmirror
/
ydb-go-sql
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
.github/workflows/tests.yml
77 строк
2 KB
asmyasnikov
inverted build tag fast
19 дек 2021, 20:25
19 дек 2021, 20:25
764a648
Код
Авторство
О чём код?
name: tests on: push: tags: - v* branches: - master - '**' pull_request: workflow_dispatch: jobs: unit: strategy: matrix: go-version: [1.16.x, 1.17.x] os: [ubuntu-latest] env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go test -race -tags=fast -coverprofile=unit.txt -covermode=atomic ./... - name: Clear report run: sed -i '/testutil\|trace\|test/d' unit.txt - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 with: file: ./unit.txt flags: unit,${{ matrix.os }},${{ matrix.go-version }} name: unit integration: strategy: matrix: go-version: [1.17.x] os: [ubuntu-latest] services: ydb: image: cr.yandex/yc/yandex-docker-local-ydb:latest ports: - 2135:2135 volumes: - /tmp/ydb_certs:/ydb_certs env: YDB_LOCAL_SURVIVE_RESTART: true YDB_USE_IN_MEMORY_PDISKS: true options: '-h localhost' env: OS: ${{ matrix.os }} GO: ${{ matrix.go-version }} YDB_CONNECTION_STRING: grpcs://localhost:2135/?database=/local YDB_SSL_ROOT_CERTIFICATES_FILE: /tmp/ydb_certs/ca.pem YDB_ANONYMOUS_CREDENTIALS: 1 runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: go test -race -coverpkg=./... -coverprofile=integration.txt -covermode=atomic ./test/... - name: Clear report run: sed -i '/testutil\|trace\|test/d' integration.txt - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 with: file: ./integration.txt flags: integration,${{ matrix.os }},${{ matrix.go-version }} name: integration