-
Notifications
You must be signed in to change notification settings - Fork 22
77 lines (74 loc) · 2.69 KB
/
coverage.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
name: matador@linux:coverage
on:
push:
branches:
- develop
- master
paths-ignore:
- .github/workflows/windows.yml
- .github/workflows/release.yml
- appveyor.yml
pull_request:
branches:
- develop
paths-ignore:
- .github/workflows/windows.yml
- .github/workflows/release.yml
- .github/workflows/release-windows.yml
- .github/workflows/linux.yml
- appveyor.yml
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
services:
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
env:
SA_PASSWORD: Password12!
ACCEPT_EULA: Y
MSSQL_PID: Developer
ports:
- 1433:1433
options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'Password12!' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- name: Create MySQL database
run: |
sudo systemctl start mysql.service
mysql --version
mysql -u root -proot -e "CREATE DATABASE matador_test;"
- name: Create MS SQL Database
run: |
sudo apt-get update && sudo apt-get install -y mssql-tools
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'Password12!' -Q 'CREATE DATABASE matador_test'
- name: CMake Version
run: cmake --version
- name: Configure CMake
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DMSSQL_CONNECTION_STRING:STRING="mssql://sa:[email protected]/matador_test (ODBC Driver 17 for SQL Server)"
-DMYSQL_CONNECTION_STRING:STRING="mysql://root:[email protected]/matador_test"
-DCOVERAGE=true
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target matador test_matador tests
- name: Copy Matador Libs
working-directory: ${{github.workspace}}/build
run: cp lib/libmatador-*.* bin/
- uses: harmon758/postgresql-action@v1
with:
postgresql version: '14'
postgresql db: matador_test
postgresql user: test
postgresql password: test123
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest --verbose -C ${{env.BUILD_TYPE}}
- name: Upload coverage to Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"