add codecov reports and github action to upload #2972
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- master | |
- prep-** | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
default: warning | |
description: "Log level" | |
required: true | |
tags: | |
description: "Test scenario tags" | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Build | |
shell: bash | |
env: | |
WHITESOURCE_API_KEY: ${{ secrets.WHITESOURCE_API_KEY }} | |
run: ./ci/build.sh | |
test-linux: | |
needs: build | |
name: ${{ matrix.cloud }} JDBC ${{ matrix.category }} on ${{ matrix.image }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image: [ 'jdbc-centos6-default' ] | |
cloud: [ 'AWS' ] | |
category: ['TestCategoryResultSet,TestCategoryOthers,TestCategoryLoader', 'TestCategoryConnection,TestCategoryStatement', 'TestCategoryArrow,TestCategoryCore', 'TestCategoryFips'] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Tests | |
shell: bash | |
env: | |
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }} | |
CLOUD_PROVIDER: ${{ matrix.cloud }} | |
TARGET_DOCKER_TEST_IMAGE: ${{ matrix.image }} | |
JDBC_TEST_CATEGORY: ${{ matrix.category }} | |
run: ./ci/test.sh | |
test-linux-old-driver: | |
name: Old JDBC ${{ matrix.category }} on ${{ matrix.image }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image: [ 'jdbc-centos6-default' ] | |
cloud: [ 'AWS' ] | |
category: ['TestCategoryResultSet,TestCategoryOthers', 'TestCategoryConnection,TestCategoryStatement', 'TestCategoryCore,TestCategoryLoader'] | |
is_old_driver: ['true'] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Tests | |
shell: bash | |
env: | |
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }} | |
CLOUD_PROVIDER: ${{ matrix.cloud }} | |
TARGET_DOCKER_TEST_IMAGE: ${{ matrix.image }} | |
JDBC_TEST_CATEGORY: ${{ matrix.category }} | |
is_old_driver: ${{ matrix.is_old_driver }} | |
run: ./ci/test.sh | |
upload-codecov-report: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Upload coverage reports to Codecov | |
- uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODE_COV_UPLOAD_TOKEN }} | |
fail_ci_if_error: true | |
files: ./it_codecov.xml,./ut_codecov.xml | |
verbose: true |