Skip to content
Open
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
44 changes: 28 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
name: Java CI
# Назва вашого робочого процесу (workflow)
name: Java CI with Maven

# Цей блок визначає, коли запускати workflow:
on:
# 1. При кожному 'push' у гілку 'main'
push:
branches: [master, main]
branches: [ "main, mybranch" ]
# 2. При кожному 'pull request', який націлений на гілку 'main'
pull_request:
branches: [master, main]
branches: [ "main" ]

# Визначаємо самі "завдання" (jobs), які потрібно виконати
jobs:
build:
# Вказуємо, що це завдання має працювати на останній версії Ubuntu
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 15
uses: actions/setup-java@v3
# Крок 1: "Викачуємо" код з вашого репозиторію на сервер GitHub
- name: Check out repository
uses: actions/checkout@v4

# Крок 2: Налаштовуємо Java
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '15'
distribution: 'adopt'
- name: Lint Code Base
uses: github/super-linter/slim@v4
env:
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVA_FILE_NAME: checkstyle.xml
- name: Test with Maven
run: mvn --batch-mode --update-snapshots package
# Вказуємо Java 17 (як у вашому pom.xml)
java-version: '17'
distribution: 'temurin'
# Вмикаємо кешування завантажених Maven залежностей
cache: 'maven'

# Крок 3: Запускаємо тести за допомогою Maven
- name: Build and test with Maven
# Команда 'mvn -B test' автоматично компілює код,
# завантажує залежності та запускає всі ваші тести.
# -B (batch mode) робить вивід логів чистішим.
run: mvn -B test --file pom.xml
3 changes: 3 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
24 changes: 24 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Getting Started

### Reference Documentation
For further reference, please consider the following sections:

* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/3.5.6/maven-plugin)
* [Create an OCI image](https://docs.spring.io/spring-boot/3.5.6/maven-plugin/build-image.html)
* [Spring Web](https://docs.spring.io/spring-boot/3.5.6/reference/web/servlet.html)

### Guides
The following guides illustrate how to use some features concretely:

* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)

### Maven Parent overrides

Due to Maven's design, elements are inherited from the parent POM to the project POM.
While most of the inheritance is fine, it also inherits unwanted elements like `<license>` and `<developers>` from the parent.
To prevent this, the project POM contains empty overrides for these elements.
If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.

9 changes: 9 additions & 0 deletions application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
spring.application.name=lab8_1

spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.format_sql=true
295 changes: 295 additions & 0 deletions mvnw

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading