mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-05 00:14:33 +08:00
Update codecov/codecov-action
to v4
(#5100)
This commit is contained in:
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@ -1,9 +1,6 @@
|
||||
name: Build
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
COVERAGE_REPORT_PATH: "target/site/jacoco/jacoco.xml"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@ -16,8 +13,19 @@ jobs:
|
||||
distribution: 'adopt'
|
||||
- name: Build with Maven
|
||||
run: mvn --batch-mode --update-snapshots verify
|
||||
- name: Upload coverage to codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
- name: Upload coverage to codecov (tokenless)
|
||||
if: >-
|
||||
github.event_name == 'pull_request' &&
|
||||
github.event.pull_request.head.repo.full_name != github.repository
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: "${{ env.REPORT_NAME }}"
|
||||
fail_ci_if_error: true
|
||||
- name: Upload coverage to codecov (with token)
|
||||
if: >
|
||||
github.repository == 'TheAlgorithms/Java' &&
|
||||
(github.event_name != 'pull_request' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository)
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: true
|
||||
|
Reference in New Issue
Block a user