Skip to content

Generate static Atom feed of Journal as part of CI #48

Generate static Atom feed of Journal as part of CI

Generate static Atom feed of Journal as part of CI #48

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.head_commit.id }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle Wrapper
run: ./gradlew build
- name: Summarize tests results
uses: jeantessier/test-summary-action@v1
if: ${{ always() }}
dist:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.head_commit.id }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Generate distribution artifacts
run: ant dist
- name: Store distribution artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: ${{ github.workspace }}/dist/*
code-coverage:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.head_commit.id }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Generate code coverage report
run: ./gradlew testCodeCoverageReport
- name: Store distribution artifacts
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: ${{ github.workspace }}/code-coverage-report/build/reports/jacoco/testCodeCoverageReport/html
dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies.
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3