Skip to content

Commit c6c2e8a

Browse files
authored
chore: improving project (#11)
* chore: improving project structure * chore: formatting project * chore: improving project * chore: adding pull request template
1 parent 8269259 commit c6c2e8a

69 files changed

Lines changed: 320 additions & 2304 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Pull Request
2+
3+
<!--
4+
Please make sure to have read the CONTRIBUTING.md guidelines.
5+
-->
6+
7+
## Description
8+
9+
<!--
10+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
11+
12+
Fixes # (issue)
13+
-->
14+
15+
## Type of change
16+
17+
<!--
18+
Please delete options that are not relevant.
19+
-->
20+
21+
- [ ] Bug fix (non-breaking change which fixes an issue)
22+
- [ ] New feature (non-breaking change which adds functionality)
23+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as
24+
expected)
25+
- [ ] Documentation update
26+
- [ ] Code style update
27+
- [ ] Refactoring
28+
- [ ] Build-related changes
29+
- [ ] CI-related changes
30+
31+
## How has this been tested?
32+
33+
<!--
34+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
35+
-->
36+
37+
All tests pass.
38+
39+
<!--
40+
## Checklist:
41+
42+
- [ ] My code follows the style guidelines of this project
43+
- [ ] I have performed a self-review of my own code
44+
- [ ] I have commented my code, particularly in hard-to-understand areas
45+
- [ ] I have made corresponding changes to the documentation
46+
- [ ] My changes generate no new warnings
47+
- [ ] I have added tests that prove my fix is effective or that my feature works
48+
- [ ] New and existing unit tests pass locally with my changes
49+
- [ ] Any dependent changes have been merged and published in downstream modules
50+
-->

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build
2+
on:
3+
push:
4+
branches: [ "develop" ]
5+
pull_request:
6+
branches: [ "develop" ]
7+
jobs:
8+
Build:
9+
if: github.repository == 'CollaborativeStateMachines/Cirrina-Baselines'
10+
name: Build
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
checks: write
15+
pull-requests: write
16+
steps:
17+
- name: Check out the repo
18+
uses: actions/checkout@v4
19+
20+
- name: Setup OpenJDK 25
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: 'temurin'
24+
java-version: '25'
25+
26+
- name: Perform commit linting
27+
uses: wagoid/commitlint-github-action@v6
28+
29+
- name: Build using Gradle
30+
run: ./gradlew build

.github/workflows/docker.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Publish Docker images
2+
on:
3+
release:
4+
types: [ published ]
5+
push:
6+
branches:
7+
- master
8+
- develop
9+
10+
jobs:
11+
PushDockerImages:
12+
if: github.repository == 'CollaborativeStateMachines/Cirrina-Baselines'
13+
name: Push ${{ matrix.target }} Image
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
target: [ diningPhilosophers ]
19+
permissions:
20+
packages: write
21+
contents: read
22+
attestations: write
23+
id-token: write
24+
steps:
25+
- name: Check out the repo
26+
uses: actions/checkout@v4
27+
28+
- name: Log in to Docker Hub
29+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
30+
with:
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_PASSWORD }}
33+
34+
- name: Extract metadata (tags, labels) for Docker
35+
id: meta
36+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
37+
with:
38+
images: collaborativestatemachines/cirrina-baselines-${{ matrix.target }}
39+
tags: |
40+
type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }}
41+
type=raw,value=stable,enable=${{ github.event_name == 'release' }}
42+
43+
type=raw,value=nightly,enable=${{ github.ref == 'refs/heads/master' }}
44+
type=sha,enable=${{ github.ref == 'refs/heads/master' }}
45+
46+
type=raw,value=unstable,enable=${{ github.ref == 'refs/heads/develop' }}
47+
type=sha,enable=${{ github.ref == 'refs/heads/develop' }}
48+
49+
- name: Build and push Docker image
50+
id: push
51+
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
52+
with:
53+
context: .
54+
file: ./${{ matrix.target }}.Dockerfile
55+
push: true
56+
tags: ${{ steps.meta.outputs.tags }}
57+
labels: ${{ steps.meta.outputs.labels }}

big/Dockerfile

Lines changed: 0 additions & 10 deletions
This file was deleted.

big/build.gradle.kts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
11
plugins {
2-
kotlin("jvm") version "2.3.0"
3-
kotlin("plugin.spring") version "2.1.20"
4-
id("org.springframework.boot") version "3.4.4"
5-
id("io.spring.dependency-management") version "1.1.7"
6-
application
2+
id("common-conventions")
73
}
84

9-
java { toolchain { languageVersion = JavaLanguageVersion.of(25) } }
10-
11-
repositories { mavenCentral() }
12-
13-
dependencies {
14-
implementation("org.springframework.boot:spring-boot-starter-web")
15-
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
16-
implementation("io.dapr:dapr-sdk:1.16.0")
17-
implementation("io.dapr:dapr-sdk-actors:1.16.0")
18-
implementation("io.dapr:dapr-sdk-springboot:1.16.0")
19-
implementation("io.dropwizard.metrics5:metrics-core:5.0.6")
20-
implementation("org.springframework.boot:spring-boot-starter-actuator")
21-
}
22-
23-
application { mainClass.set("ac.at.uibk.dps.dapr.big.BigKt") }
5+
application {
6+
mainClass.set("ac.at.uibk.dps.dapr.barber.BigKt")
7+
}

0 commit comments

Comments
 (0)