mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-05 08:17: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
|
name: Build
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
env:
|
|
||||||
COVERAGE_REPORT_PATH: "target/site/jacoco/jacoco.xml"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -16,8 +13,19 @@ jobs:
|
|||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
- name: Build with Maven
|
- name: Build with Maven
|
||||||
run: mvn --batch-mode --update-snapshots verify
|
run: mvn --batch-mode --update-snapshots verify
|
||||||
- name: Upload coverage to codecov
|
- name: Upload coverage to codecov (tokenless)
|
||||||
uses: codecov/codecov-action@v3
|
if: >-
|
||||||
|
github.event_name == 'pull_request' &&
|
||||||
|
github.event.pull_request.head.repo.full_name != github.repository
|
||||||
|
uses: codecov/codecov-action@v4
|
||||||
with:
|
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
|
fail_ci_if_error: true
|
||||||
|
Reference in New Issue
Block a user