Skip to content

test: appointment service impl #240

test: appointment service impl

test: appointment service impl #240

Workflow file for this run

name: Lint => Test => Release
on:
push:
release:
types: [ created ]
jobs:
lint-and-test:
strategy:
matrix:
platform: [ubuntu-latest]
java-version: [8]
maven: ['3.6.3']
runs-on: ${{ matrix.platform }}
env:
PLATFORM: ${{ matrix.platform }}
JAVA_VERSION: ${{ matrix.java-version }}
# Grant status permission for MULTI_STATUS #
permissions:
contents: write
packages: read
statuses: write
security-events: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: adopt
cache: maven
- name: Setup Maven Action
uses: s4u/[email protected]
with:
java-version: ${{ matrix.java-version }}
maven-version: ${{ matrix.maven }}
# Enable caching dependencies to speed up the build
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
# Checkout code
- name: Checkout Code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter/[email protected]
env:
VALIDATE_ALL_CODEBASE: true
VALIDATE_JAVA: true
VALIDATE_XML: true
DEFAULT_BRANCH: develop
JAVA_FILE_NAME: checkstyle.xml
- name: Install Dependencies
run: mvn clean install -Dartifact.version=1.0.0 -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version --file pom.xml
- name: Test and Generate Coverage Report
run: mvn -B verify -P coverage --no-transfer-progress -Dartifact.version=1.0.0
- name: Post Coverage Report to CodeCov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./api/target/site/jacoco/jacoco.xml, ./omod/target/site/jacoco/jacoco.xml
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
release:
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
server-id: github
settings-path: ${{ github.workspace }}
- name: Build Assets
run: mvn clean install --file pom.xml -Dartifact.version=${{ github.event.release.tag_name }} -DskipTests=true
- name: Generate Dependency Graph
run: mvn com.github.ferstl:depgraph-maven-plugin:4.0.2:reactor -DgraphFormat=json -DoutputFileName=reactor.json -Dartifact.version=${{ github.event.release.tag_name }}
- name: Prepare Released Files
run: mkdir -p released-files
working-directory: ${{ github.workspace }}
- name: Copy omod to Released Files
run: cp omod/target/mycarehub-${{ github.event.release.tag_name }}.omod released-files/
working-directory: ${{ github.workspace }}
- name: "✏️ Generate release changelog"
uses: heinrichreimer/[email protected]
with:
token: ${{ secrets.RELEASE_PAT }}
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
with:
files: released-files/mycarehub-${{ github.event.release.tag_name }}.omod
tag_name: ${{ github.event.release.tag_name }}
body_path: CHANGELOG.md
token: ${{ secrets.RELEASE_PAT }}