Update examples in README #489
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches-ignore: | |
- 'dependabot/**' | |
- 'gh-pages' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
# Skip duplicate build on pull_request if pull request uses branch from the same repository | |
if: github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# Required to deduce version from git tags | |
fetch-depth: 0 | |
- name: Skip build if not needed | |
id: skipper | |
uses: coditory/skip-action@v1 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
skip-files: |- | |
^.gitignore | |
^[^/]*\.md | |
^.github/.*\.md | |
^docs/.* | |
^gradle.properties | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
if: steps.skipper.outputs.skip != 'true' | |
with: | |
java-version: 21 | |
distribution: temurin | |
- name: Validate gradle wrapper | |
uses: gradle/actions/wrapper-validation@v4 | |
if: steps.skipper.outputs.skip != 'true' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
if: steps.skipper.outputs.skip != 'true' | |
with: | |
# Publish dependency graph only for the default branch | |
dependency-graph: | | |
${{ (github.event.repository != null && github.ref_name == github.event.repository.default_branch) | |
&& 'generate-and-submit' || 'disabled' }} | |
- name: Build | |
if: steps.skipper.outputs.skip != 'true' | |
run: ./gradlew build coverage | |
- name: Publish Coverage Report | |
uses: codecov/codecov-action@v4 | |
# Publish coverage only for the default branch | |
if: | | |
steps.skipper.outputs.skip != 'true' | |
&& github.event.repository != null | |
&& github.ref_name == github.event.repository.default_branch | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
override_commit: ${{ github.event.workflow_run.head_sha }} | |
override_branch: ${{ github.event.workflow_run.head_branch }} | |
override_build: ${{ github.event.workflow_run.id }} | |
disable_search: true | |
files: build/reports/kover/report.xml |