-
Notifications
You must be signed in to change notification settings - Fork 30
152 lines (133 loc) · 4.73 KB
/
build_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#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:
fail-fast: false
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.1.28', '8.2.18', '8.3.6']
# 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:
fail-fast: false
matrix:
php-version: ['8.1', '8.2', '8.3']
# 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:
fail-fast: false
matrix:
php-version: ['8.1', '8.2', '8.3']
# The type of runner that the job will run on
runs-on: macos-13
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
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
# without the token code cov may fail because of Github limits https://github.com/codecov/codecov-action/issues/557
token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }}
fail_ci_if_error: true
gcov: true