Skip to content

SNOW-871412 SNOW736357: Add connection parameters for query context cache and retry context #52

SNOW-871412 SNOW736357: Add connection parameters for query context cache and retry context

SNOW-871412 SNOW736357: Add connection parameters for query context cache and retry context #52

Workflow file for this run

#common envs
env:
SNOWFLAKE_TEST_USER: ${{ secrets.SNOWFLAKE_TEST_USER }}
SNOWFLAKE_TEST_PASSWORD: ${{ secrets.SNOWFLAKE_TEST_PASSWORD }}
SNOWFLAKE_TEST_ACCOUNT: ${{ secrets.SNOWFLAKE_TEST_ACCOUNT }}
SNOWFLAKE_TEST_WAREHOUSE: ${{ secrets.SNOWFLAKE_TEST_WAREHOUSE }}
SNOWFLAKE_TEST_DATABASE: ${{ secrets.SNOWFLAKE_TEST_DATABASE }}
SNOWFLAKE_TEST_SCHEMA: ${{ secrets.SNOWFLAKE_TEST_SCHEMA }}
SNOWFLAKE_TEST_ROLE: ${{ secrets.SNOWFLAKE_TEST_ROLE }}
name: build_test
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
push:
branches: [ master, simba-driverbuildtest-workflow ]
pull_request:
branches: [ master, simba-driverbuildtest-workflow ]
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_test_windows:
strategy:
matrix:
# have to specify minor version on windows
# otherwise could get version mismatch issue when running test on github
# need to keep track on the latest version
php-version: ['8.0.30', '8.1.23', '8.2.10']
# The type of runner that the job will run on
runs-on: windows-2019
env:
ARCH: x64
TARGET: Release
VS: VS16
PHP: ${{ matrix.php-version }}
TEST_PHP_EXECUTABLE: c:\tools\php\php.exe
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: setup php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: pdo, json
env:
phpts: ts
- name: build driver
run: python .\.github\workflows\scripts\build_driver.py
shell: cmd
- name: test driver
run: python .\.github\workflows\scripts\test_driver.py
shell: cmd
build_test_linux:
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2']
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
PHP_HOME: /usr
TEST_PHP_EXECUTABLE: /usr/bin/php
NO_INTERACTION: true
USE_VALGRIND: 0
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: setup php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: pdo, json
coverage: xdebug2
- name: build driver
run: python ./.github/workflows/scripts/build_driver.py
- name: test driver
run: python ./.github/workflows/scripts/test_driver.py
build_test_mac:
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2']
# The type of runner that the job will run on
runs-on: macos-latest
env:
PHP_HOME: /usr/local
TEST_PHP_EXECUTABLE: /usr/local/bin/php
NO_INTERACTION: true
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: setup php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: pdo, json
- name: build driver
run: python ./.github/workflows/scripts/build_driver.py
- name: test driver
run: python ./.github/workflows/scripts/test_driver.py
code-coverage:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
REPORT_COVERAGE: 1
PHP_HOME: /usr
TEST_PHP_EXECUTABLE: /usr/bin/php
NO_INTERACTION: true
USE_VALGRIND: 0
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: setup php
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: pdo, json
coverage: xdebug2
- name: Setup LCOV
run: sudo apt-get -y install lcov
shell: bash
- name: build driver
run: python ./.github/workflows/scripts/build_driver.py
- name: test driver
run: python ./.github/workflows/scripts/test_driver.py
# codecov action sometimes fails but retry works - until action provides retry let's retry on our own https://github.com/codecov/codecov-action/issues/926
- name: Upload coverage reports to Codecov (take 1)
id: uploadToCodeCovTake1
uses: codecov/codecov-action@v3
continue-on-error: true
with:
gcov: true
verbose: true
fail_ci_if_error: true
- name: Upload coverage reports to Codecov (take 2)
id: uploadToCodeCovTake2
# only run when take 1 failed
if: steps.uploadToCodeCovTake1.outcome == 'failure'
uses: codecov/codecov-action@v3
with:
gcov: true
verbose: true
fail_ci_if_error: true