mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: Build
|
|
on: [push, pull_request]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
java-version: 21
|
|
distribution: 'temurin'
|
|
- name: Build with Maven
|
|
run: mvn --batch-mode --update-snapshots verify
|
|
- 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@v5
|
|
with:
|
|
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@v5
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
fail_ci_if_error: true
|
|
- name: Checkstyle
|
|
run: mvn checkstyle:check
|
|
- name: SpotBugs
|
|
run: mvn spotbugs:check
|
|
- name: PMD
|
|
run: mvn pmd:check
|