Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation de la base de la CI/CD #1

Merged
merged 8 commits into from
May 29, 2024
Merged
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
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test Gradle project

on: [push, pull_request]

jobs:

lint-gradle-project:
runs-on: ubuntu-latest

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

- name: Set Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3

- name: Run lint
run: ./gradlew lint

build-gradle-project:
runs-on: ubuntu-latest

needs: lint-gradle-project

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

- name: Set Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3

- name: Run build
run: ./gradlew build
32 changes: 19 additions & 13 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 '3.2.5'
id("io.spring.dependency-management") version "1.0.11.RELEASE"
id "nebula.lint" version "17.8.0"
}

group = 'org.ghuh'
Expand All @@ -16,23 +17,28 @@ repositories {
}

dependencies {
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation("org.springframework.boot:spring-boot-starter-validation")
developmentOnly("org.springframework.boot:spring-boot-devtools")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")

compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")

runtimeOnly("com.h2database:h2")
testImplementation("org.springframework.boot:spring-boot-starter-test")
implementation("io.swagger.core.v3:swagger-annotations:2.1.12")
implementation "org.springframework.boot:spring-boot-starter-validation"
developmentOnly "org.springframework.boot:spring-boot-devtools"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"

annotationProcessor "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok"

runtimeOnly "com.h2database:h2"
testImplementation "org.springframework.boot:spring-boot-starter-test"
implementation 'org.springframework.boot:spring-boot-autoconfigure:3.2.5'
implementation 'org.springframework.boot:spring-boot:3.2.5'
implementation 'org.springframework:spring-context:6.1.6'
implementation 'org.springframework:spring-web:6.1.6'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
testImplementation 'org.springframework.boot:spring-boot-test:3.2.5'
}

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

gradleLint.rules = ['dependency-parentheses', 'dependency-tuple']
Empty file removed lint.gradle
Empty file.
6 changes: 6 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
spring.application.name=ctcd

CITY_API_ADDR=127.0.0.1
CITY_API_PORT=2022
CITY_API_DB_URL=""
CITY_API_DB_USER=""
CITY_API_DB_PWD=""