diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..49948b5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "maven" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 53b013a..c722834 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,13 +3,16 @@ name: CI Pipeline on: push: branches: - - main + - release + - development pull_request: branches: - - main + - release + - development + - '*' jobs: - build: + build-and-test: runs-on: ubuntu-latest steps: @@ -19,6 +22,7 @@ jobs: - name: Set up JDK 22 uses: actions/setup-java@v3 with: + distribution: 'temurin' java-version: '22' - name: Cache Maven packages @@ -29,11 +33,34 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - - name: Run Checkstyle - run: mvn checkstyle:check - - name: Build with Maven - run: mvn clean install + run: mvn clean install -ntp - name: Run tests run: mvn test + + deploy: + needs: build-and-test + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/release' + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 22 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '22' + + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Deploy to Production + run: echo "Deploying to production..." \ No newline at end of file diff --git a/.run/RoomradarApplication.run.xml b/.run/RoomradarApplication.run.xml new file mode 100644 index 0000000..33581cd --- /dev/null +++ b/.run/RoomradarApplication.run.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/compose.yaml b/compose.yaml deleted file mode 100644 index 0baad47..0000000 --- a/compose.yaml +++ /dev/null @@ -1 +0,0 @@ -services: diff --git a/pom.xml b/pom.xml index 059dae2..e14cec7 100644 --- a/pom.xml +++ b/pom.xml @@ -38,10 +38,6 @@ org.springframework.boot spring-boot-starter-graphql - - org.springframework.boot - spring-boot-starter-security - org.springframework.boot spring-boot-starter-validation @@ -54,13 +50,6 @@ org.springframework.boot spring-boot-starter-webflux - - - org.springframework.boot - spring-boot-docker-compose - runtime - true - org.projectlombok lombok @@ -86,23 +75,16 @@ spring-security-test test + + org.springframework.boot + spring-boot-devtools + runtime + true + - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.1.2 - - - validate - - check - - - - org.springframework.boot spring-boot-maven-plugin diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties new file mode 100644 index 0000000..69112e9 --- /dev/null +++ b/src/main/resources/application-local.properties @@ -0,0 +1,3 @@ +spring.graphql.graphiql.enabled=true +spring.devtools.restart.poll-interval=2s +spring.devtools.restart.quiet-period=1s \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 47eb9ad..e1fe00c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1 +1,2 @@ spring.application.name=roomradar +server.error.whitelabel.enabled=false diff --git a/src/main/resources/graphql/schema.graphqls b/src/main/resources/graphql/schema.graphqls new file mode 100644 index 0000000..cbb15dc --- /dev/null +++ b/src/main/resources/graphql/schema.graphqls @@ -0,0 +1,3 @@ +type Query { + test: [String] +}