Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 9 additions & 29 deletions .github/workflows/ci-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI - Coverage
on:
pull_request:
push:
branches: [ main ]
branches: [ master ]

workflow_dispatch:

Expand All @@ -20,9 +20,9 @@ jobs:
fail-fast: false
matrix:
node-version: [20.x]
mysql-version: ["mysql:8.0.33"]
use-compression: [0]
use-tls: [0]
mysql-version: ["mysql:5.7", "mysql:8.0.33"]
use-compression: [0, 1]
use-tls: [0, 1]
mysql_connection_url_key: [""]
env:
MYSQL_CONNECTION_URL: ${{ secrets[matrix.mysql_connection_url_key] }}
Expand All @@ -32,13 +32,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Delete artifacts
uses: jimschubert/delete-artifacts-action@v1
with:
log_level: 'debug'
min_bytes: '0'
pattern: '\.xml'

- name: Set up MySQL
if: ${{ matrix.mysql-version }}
run: docker run -d -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -e MYSQL_DATABASE=${{ env.MYSQL_DATABASE }} -v $PWD/mysqldata:/var/lib/mysql/ -v $PWD/test/fixtures/custom-conf:/etc/mysql/conf.d -v $PWD/test/fixtures/ssl/certs:/certs -p ${{ env.MYSQL_PORT }}:3306 ${{ matrix.mysql-version }}
Expand All @@ -65,22 +58,9 @@ jobs:
- name: Run tests
run: FILTER=${{matrix.filter}} MYSQL_USE_TLS=${{ matrix.use-tls }} MYSQL_USE_COMPRESSION=${{ matrix.use-compression }} npm run coverage-test

- name: get list of coverage files
run: echo "coverage-files=`find coverage | grep xml | paste -s -d\; -`" >> $GITHUB_ENV

- name: ReportGenerator
uses: danielpalme/[email protected]
with:
reports: "${{ env.coverage-files }}"
targetdir: '.'
reporttypes: 'Cobertura'

- name: Debug
run: cat Cobertura.xml

- name: Display coverage
uses: ewjoachim/coverage-comment-action@v1
continue-on-error: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
COVERAGE_FILE: "Cobertura.xml"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
flags: compression-${{ matrix.use-compression }},tls-${{ matrix.use-tls }}
name: codecov-umbrella-${{ matrix.node-version }}-${{ matrix.mysql-version }}-compression-${{ matrix.use-compression }}-tls-${{ matrix.use-tls }}
2 changes: 1 addition & 1 deletion .github/workflows/ci-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
mysql -u root -e "CREATE DATABASE IF NOT EXISTS ${MYSQL_DATABASE};"

- name: Run tests
run: FILTER=${{matrix.filter}} MYSQL_USE_TLS=${{ matrix.use-tls }} MYSQL_USE_COMPRESSION=${{ matrix.use-compression }} npm run coverage-test
run: FILTER=${{matrix.filter}} MYSQL_USE_TLS=${{ matrix.use-tls }} MYSQL_USE_COMPRESSION=${{ matrix.use-compression }} npm run test