@@ -3,7 +3,7 @@ name: CI - Coverage
3
3
on :
4
4
pull_request :
5
5
push :
6
- branches : [ main ]
6
+ branches : [ master ]
7
7
8
8
workflow_dispatch :
9
9
20
20
fail-fast : false
21
21
matrix :
22
22
node-version : [20.x]
23
- mysql-version : ["mysql:8.0.33"]
24
- use-compression : [0]
25
- use-tls : [0]
23
+ mysql-version : ["mysql:5.7", "mysql: 8.0.33"]
24
+ use-compression : [0, 1 ]
25
+ use-tls : [0, 1 ]
26
26
mysql_connection_url_key : [""]
27
27
env :
28
28
MYSQL_CONNECTION_URL : ${{ secrets[matrix.mysql_connection_url_key] }}
32
32
steps :
33
33
- uses : actions/checkout@v4
34
34
35
- - name : Delete artifacts
36
- uses : jimschubert/delete-artifacts-action@v1
37
- with :
38
- log_level : ' debug'
39
- min_bytes : ' 0'
40
- pattern : ' \.xml'
41
-
42
35
- name : Set up MySQL
43
36
if : ${{ matrix.mysql-version }}
44
37
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 }}
65
58
- name : Run tests
66
59
run : FILTER=${{matrix.filter}} MYSQL_USE_TLS=${{ matrix.use-tls }} MYSQL_USE_COMPRESSION=${{ matrix.use-compression }} npm run coverage-test
67
60
68
- - name : get list of coverage files
69
- run : echo "coverage-files=`find coverage | grep xml | paste -s -d\; -`" >> $GITHUB_ENV
70
-
71
- - name : ReportGenerator
72
- uses :
danielpalme/[email protected]
73
- with :
74
- reports : " ${{ env.coverage-files }}"
75
- targetdir : ' .'
76
- reporttypes : ' Cobertura'
77
-
78
- - name : Debug
79
- run : cat Cobertura.xml
80
-
81
- - name : Display coverage
82
- uses : ewjoachim/coverage-comment-action@v1
83
- continue-on-error : true
61
+ - name : Upload coverage reports to Codecov
62
+ uses : codecov/codecov-action@v4
84
63
with :
85
- COVERAGE_FILE : " Cobertura.xml"
86
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64
+ token : ${{ secrets.CODECOV_TOKEN }}
65
+ flags : compression-${{ matrix.use-compression }},tls-${{ matrix.use-tls }}
66
+ name : codecov-umbrella-${{ matrix.node-version }}-${{ matrix.mysql-version }}-compression-${{ matrix.use-compression }}-tls-${{ matrix.use-tls }}
0 commit comments