Skip to content

Commit 2d0a2e3

Browse files
committed
.github: add codecov coverage check
It seems codecov can overcome the pull_request_target limitation/issue compared to sonarcloud coverage. We've some other Apache projects who use `codecov` now and this ticket to add support with infra: https://issues.apache.org/jira/browse/INFRA-23561 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent bca6076 commit 2d0a2e3

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/codecov.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Coverage Check
19+
20+
on: [pull_request, push]
21+
22+
permissions:
23+
contents: read
24+
25+
jobs:
26+
build:
27+
name: codecov
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v3
31+
32+
- name: Set up JDK11
33+
uses: actions/setup-java@v3
34+
with:
35+
distribution: 'temurin'
36+
java-version: '11'
37+
cache: 'maven'
38+
39+
- name: Build CloudStack with Quality Checks
40+
run: |
41+
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
42+
cd nonoss && bash -x install-non-oss.sh && cd ..
43+
mvn -P quality -Dsimulator -Dnoredist clean install
44+
45+
- uses: codecov/codecov-action@v3
46+
with:
47+
files: ./client/target/site/jacoco-aggregate/jacoco.xml
48+
fail_ci_if_error: true
49+
verbose: true
50+
name: codecov

0 commit comments

Comments
 (0)