Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,21 @@ assignees: ''
---

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior:

**Expected behavior**

A clear and concise description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Additional context**

Add any other context about the problem here.
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/dev_task.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ assignees: ''
# Dev task

**Description**

Briefly describe the feature or improvement.

**Related user story:** Please include link to the related user story here.

**Motivation**

Why is this useful? What problem does it solve?

**Estimate**

The estimation of how long will this user story take.

**Additional context**

Add any other context or screenshots about the feature request here.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/user_story.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ assignees: ''
# User story

## Description

Please describe the user story here.

**Estimate:** The estimation of how long this user story takes.
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Workflow for Codecov example-java-gradle

on:
push:
branches: [ "main" , "dev" ]
pull_request:

permissions:
contents: read
pull-requests: write

jobs:
run:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21

- name: Install dependencies, run tests, and collect coverage
run: gradle build

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
23 changes: 23 additions & 0 deletions .github/workflows/dev-to-main-only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

name: Allow only dev to merge into main

on:
pull_request:
branches:
- main

jobs:
validate-source-branch:
runs-on: ubuntu-latest
steps:
- name: Check source branch
run: |
echo "Base branch: ${{ github.event.pull_request.base.ref }}"
echo "Head branch: ${{ github.event.pull_request.head.ref }}"

if [ "${{ github.event.pull_request.head.ref }}" != "dev" ]; then
echo "Only dev branch is allowed to merge into main"
exit 1
fi

echo "dev branch detected, merge allowed"
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Docker Image

on:
push:
branches: [ "main" ]
branches: [ "main" , "dev" ]
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions:

on:
push:
branches: [ "main" ]
branches: [ "main" , "dev"]
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Gradle Build

on:
push:
branches: [ "main" ]
branches: [ "main" , "dev" ]
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Unit test

on:
push:
branches: [ "main" ]
branches: [ "main" , "dev" ]
pull_request:

jobs:
Expand Down
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'java'
id 'org.springframework.boot' version '4.0.1'
id 'io.spring.dependency-management' version '1.1.7'
id 'jacoco'
}

group = 'com.backend'
Expand All @@ -26,4 +27,18 @@ dependencies {

tasks.named('test') {
useJUnitPlatform()
finalizedBy jacocoTestReport
}

jacoco {
toolVersion = "0.8.11"
}

jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = true
csv.required = false
}
}
Loading