Skip to content

Commit

Permalink
fix: Add checksum (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
thced authored Jun 14, 2024
1 parent 113e3a7 commit be3496f
Show file tree
Hide file tree
Showing 11 changed files with 473 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.properties]
trim_trailing_whitespace = false
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
registries:
nexus-releases:
type: maven-repository
url: https://repo.extendaretail.com/repository/maven-releases/
username: ${{ secrets.NEXUS_MAVEN_USERNAME }}
password: ${{ secrets.NEXUS_MAVEN_PASSWORD }}
updates:
- package-ecosystem: maven
registries:
- nexus-releases
directory: '/'
schedule:
interval: monthly
27 changes: 27 additions & 0 deletions .github/workflows/commit-msg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: commit-msg
on:
pull_request:
types:
- edited
- opened
- reopened
- synchronize

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Lint pull request title
uses: extenda/actions/commitlint@v0
with:
message: ${{ github.event.pull_request.title }}

- name: Lint commit messages
if: always()
uses: extenda/actions/commitlint@v0
with:
relaxed: ${{ contains(job.status, 'success') }}
59 changes: 59 additions & 0 deletions .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Commit
on: push

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version-file: .java-version
cache: 'maven'

- name: Run tests
uses: extenda/actions/maven@v0
with:
args: verify
service-account-key: ${{ secrets.SECRET_AUTH }}

- name: Scan with SonarCloud
uses: extenda/actions/sonar-scanner@v0
with:
sonar-host: https://sonarcloud.io
sonar-scanner: maven
main-branch: master
service-account-key: ${{ secrets.SECRET_AUTH }}

release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version-file: .java-version
cache: 'maven'

- name: Create release
uses: extenda/actions/conventional-release@v0
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build release
uses: extenda/actions/maven@v0
with:
args: deploy -DskipTests
version: ${{ steps.release.outputs.version }}
service-account-key: ${{ secrets.SECRET_AUTH }}
23 changes: 23 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: pre-commit
on: pull_request

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v5

- uses: actions/setup-java@v4
with:
java-version-file: .java-version
distribution: temurin

- name: Run pre-commit
uses: pre-commit/[email protected]
with:
extra_args: --from-ref=${{ github.event.pull_request.base.sha }} --to-ref=${{ github.sha }}
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
21
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
default_stages: [commit]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: test/__snapshots__
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: remove-crlf
- id: remove-tabs
args: [ --whitespaces-count=2 ]
- repo: https://github.com/extenda/pre-commit-hooks
rev: v0.9.0
hooks:
- id: google-java-formatter
- id: commitlint
stages: [commit-msg]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Extenda Retail

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit be3496f

Please sign in to comment.