diff --git a/.drone.yml b/.drone.yml index 1c579d6..f79fbda 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,9 +1,71 @@ kind: pipeline type: docker -name: default +name: commit steps: - - name: Build + - name: checks image: eclipse-temurin:17-jdk commands: - - ./mvnw package -B -DskipTests=true \ No newline at end of file + - apt-get update -qq && apt-get install -qy python3 pip git && pip install pre-commit + - pre-commit run --all-files + +--- +kind: pipeline +type: docker +name: pr + +steps: + - name: tests + image: quay.io/testcontainers/dind-drone-plugin + environment: + CI_WORKSPACE: "/drone/src" + settings: + cmd: ./mvnw -B test + build_image: eclipse-temurin:17-jdk + prefetch_images: + - "postgres:13-alpine" + volumes: + - name: dockersock + path: /var/run + +# Specify docker:dind as a service +services: + - name: docker + image: docker:dind + privileged: true + volumes: + - name: dockersock + path: /var/run + +volumes: + - name: dockersock + temp: {} + +trigger: + event: + - pull_request + - cron + +--- +kind: pipeline +type: docker +name: artifacts + +steps: + - name: packaging + image: eclipse-temurin:17-jdk + commands: + - ./mvnw package -B -DskipTests=true -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true + - name: dockerfile + image: thegeeklab/drone-docker-buildx:23 + privileged: true + settings: + pull_image: true + dry_run: true + +trigger: + branch: + - devel + event: + - push + - tag diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 0000000..f90ed06 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,2 @@ +MD013: + line_length: 120 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..35810b8 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,33 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +exclude: "mvnw" +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + exclude: "^.*\\.vm$" + - id: check-yaml + args: [--allow-multiple-documents] + - id: check-added-large-files + - id: check-toml + - id: mixed-line-ending + - repo: https://github.com/gruntwork-io/pre-commit + rev: v0.1.17 + hooks: + - id: shellcheck + - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks + rev: v2.4.0 + hooks: + - id: pretty-format-java + args: [--autofix] + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.32.2 + hooks: + - id: markdownlint + - id: markdownlint-fix + - repo: https://github.com/jorisroovers/gitlint + rev: v0.17.0 + hooks: + - id: gitlint diff --git a/.run/Execute all tests.run.xml b/.run/Execute all tests.run.xml index 28aa703..3a4861c 100644 --- a/.run/Execute all tests.run.xml +++ b/.run/Execute all tests.run.xml @@ -14,4 +14,4 @@