File tree 1 file changed +14
-6
lines changed
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : Build
2
2
on : [push, pull_request]
3
3
4
- env :
5
- COVERAGE_REPORT_PATH : " target/site/jacoco/jacoco.xml"
6
-
7
4
jobs :
8
5
build :
9
6
runs-on : ubuntu-latest
16
13
distribution : ' adopt'
17
14
- name : Build with Maven
18
15
run : mvn --batch-mode --update-snapshots verify
19
- - name : Upload coverage to codecov
20
- uses : codecov/codecov-action@v3
16
+ - name : Upload coverage to codecov (tokenless)
17
+ if : >-
18
+ github.event_name == 'pull_request' &&
19
+ github.event.pull_request.head.repo.full_name != github.repository
20
+ uses : codecov/codecov-action@v4
21
+ with :
22
+ fail_ci_if_error : true
23
+ - name : Upload coverage to codecov (with token)
24
+ if : >
25
+ github.repository == 'TheAlgorithms/Java' &&
26
+ (github.event_name != 'pull_request' ||
27
+ github.event.pull_request.head.repo.full_name == github.repository)
28
+ uses : codecov/codecov-action@v4
21
29
with :
22
- files : " ${{ env.REPORT_NAME }}"
30
+ token : ${{ secrets.CODECOV_TOKEN }}
23
31
fail_ci_if_error : true
You can’t perform that action at this time.
0 commit comments