Skip to content

Commit 9cc42d1

Browse files
bochencwxliucf3995
authored andcommitted
Feature: use container for ci workflow and add codecov report
1 parent 75a7f1a commit 9cc42d1

File tree

3 files changed

+57
-7
lines changed

3 files changed

+57
-7
lines changed

.github/.codecov.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
comment:
2+
layout: "reach,diff,flags,tree"
3+
behavior: default
4+
require_changes: false
5+
6+
coverage:
7+
status:
8+
project:
9+
default:
10+
threshold: 5%

.github/workflows/ci.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,20 @@ jobs:
1313
compile-with-bazel:
1414
runs-on:
1515
group: Default
16-
labels: trpc-cpp-plugins-ci
16+
labels: trpc-ecosystem-cpp-ci
17+
container:
18+
image: ghcr.io/trpc-ecosystem/trpc-cpp-jaeger-gcc8-centos7:0.1.0
1719
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v3
20-
- name: Test
21-
run: |
22-
./clean.sh
23-
bazel test //trpc/...
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
- name: Test
23+
run: |
24+
export PATH=/opt/rh/devtoolset-8/root/usr/bin:$PATH
25+
./clean.sh
26+
bazel coverage //trpc/... --test_output=all --coverage_report_generator="@bazel_tools//tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator:Main" --combined_report=lcov --nocache_test_results
27+
- name: Upload coverage reports to Codecov
28+
uses: codecov/codecov-action@v3
29+
env:
30+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
31+
with:
32+
file: bazel-out/_coverage/_coverage_report.dat

.github/workflows/cla.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "CLA Assistant"
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened, synchronize, reopened]
7+
8+
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
9+
permissions:
10+
actions: write
11+
contents: write
12+
pull-requests: write
13+
statuses: write
14+
15+
jobs:
16+
CLAAssistant:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: "CLA Assistant"
20+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
21+
uses: contributor-assistant/[email protected]
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_DATABASE_ACCESS_TOKEN }}
25+
with:
26+
remote-organization-name: trpc-group
27+
remote-repository-name: cla-database
28+
path-to-signatures: 'signatures/${{ github.event.repository.name }}-${{ github.repository_id }}/cla.json'
29+
path-to-document: 'https://github.com/trpc-group/cla-database/blob/main/Tencent-Contributor-License-Agreement.md'
30+
# branch should not be protected
31+
branch: 'main'

0 commit comments

Comments
 (0)