Skip to content

Commit

Permalink
#1: Setup project
Browse files Browse the repository at this point in the history
  • Loading branch information
dgroup committed Mar 6, 2021
0 parents commit 373ea34
Show file tree
Hide file tree
Showing 26 changed files with 1,362 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .0pdd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
errors:
- [email protected]

tags:
- pdd
29 changes: 29 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto eol=lf


# Add readily-visible signature (in SHA format) to all files (tagged by $Id$) with extension below.
# Read more https://gist.github.com/treyharris/f98b708c9f5b753d60a2 .
*.java ident
*.yml ident
*.xml ident


# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.txt text
*.java text
*.groovy text
*.xml text
*.md text
*.pom text
*.properties text
*.tex text
*.vm text
*.xsl text
*.yml text


# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
76 changes: 76 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the github@dgroup. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
9 changes: 9 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Just send a pull request and call it a day.





Only if the build is green, you send us your pull request.

Thanks!
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Make sure the title of the issue explains the problem you are having. Also, the description of the issue must clearly explain what is broken, not what you want us to implement. Go through this checklist and make sure you answer "YES" to all points:

- You have all pre-requisites listed in README.md installed
- You are sure that you are not reporting a duplicate (search all issues)
- You say "is broken" or "doesn't work" in the title
- You tell us what you are trying to do
- You explain the results you are getting
- You suggest an alternative result you would like to see

These articles will help you understand what we are looking for:
* http://www.yegor256.com/2014/11/24/principles-of-bug-tracking.html
* https://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Thank you for your contribution!
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Many thanks for your contribution, we truly appreciate it. We will appreciate it even more, if you make sure that you can say "YES" to each point in this short checklist:

- You made a small amount of changes (less than 100 lines, less than 10 files)
- You made changes related to only one bug (create separate PRs for separate problems)
- You are ready to defend your changes (there will be a code review)
- You don't touch what you don't understand
- You ran the build locally and it passed

This article will help you understand what we are looking for: http://www.yegor256.com/2015/02/09/serious-code-reviewer.html

Thank you for your contribution!
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI
on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build:
name: Build
# @todo #/DEV Think about matrix build for linux,osx and win OS.
# https://stackoverflow.com/questions/57946173/github-actions-run-step-on-specific-os
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
# @todo #/DEV Enable Java8 for this project. For now the default config is used for JDK15.
- name: Set up JDK 15
uses: actions/setup-java@v1
with:
java-version: 15
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
MAVEN_OPTS: |
-Xmx1024m
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS
-Dorg.slf4j.simpleLogger.showDateTime=true
JIRA_URL: ${{ secrets.JIRA_URL }}
JIRA_USER: ${{ secrets.JIRA_USER }}
JIRA_PASS: ${{ secrets.JIRA_PASS }}
run: |
mvn -B -P qulice clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
bash <(curl -s https://codecov.io/bash)
75 changes: 75 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

env:
java: 15

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '20 7 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: '${{ env.java }}'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/target
*.iml
*.iws
*.class
/.idea/
/.tmp/
*.jar
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.8
4 changes: 4 additions & 0 deletions .pdd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--source=.
--verbose
--exclude target/**/*
--exclude docs
34 changes: 34 additions & 0 deletions .rultor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
architect:
- dgroup

readers:
- "urn:github:1651114"

# @todo #/DEV Configure the deployment to dev maven repository in Github in order to work with RC and snapshots.
# The dev repo should be Github for master branch + bugfix branches if needed.
# As a plan B, we can consider promoting using Nexus+OSSRH:
# https://help.sonatype.com/repomanager2/staging-releases/staging-overview
# https://help.sonatype.com/repomanager2/staging-releases/configuring-your-project-for-deployment
# https://nvie.com/posts/a-successful-git-branching-model
# https://github.com/nvie/gitflow
# https://gist.github.com/lemiorhan/97b4f827c08aed58a9d8
# https://github.com/jgitver/jgitver
# https://danielkummer.github.io/git-flow-cheatsheet/index.html
assets:
settings.xml: "dgroup/ossrh#settings.xml"
# @todo #/DEV Generate a new key for signing and publishing artifacts to Maven Central.
pubring.gpg: "dgroup/ossrh#enumberable4j-pubring.gpg"
secring.gpg: "dgroup/ossrh#enumberable4j-secring.gpg"

merge:
env:
MAVEN_OPTS: "-XX:MaxPermSize=256m -Xmx512m"
script:
- mvn -Pqulice clean package

release:
script: |
mvn versions:set "-DnewVersion=${tag}"
git add pom.xml
git commit -am "${tag}"
mvn -X -V -Dgpg.homedir="$HOME" -P qulice,ossrh-enumberable4j -s ../settings.xml clean deploy
Loading

6 comments on commit 373ea34

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 373ea34 Mar 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle DEV-8084d74e discovered in .rultor.yml and submitted as #2. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 373ea34 Mar 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle DEV-c5e35e81 discovered in .rultor.yml and submitted as #3. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 373ea34 Mar 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle DEV-08faa53a discovered in pom.xml and submitted as #4. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 373ea34 Mar 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle DEV-5f4df571 discovered in pom.xml and submitted as #5. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 373ea34 Mar 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle DEV-498a8074 discovered in .github/workflows/build.yml and submitted as #6. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 373ea34 Mar 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle DEV-edd83387 discovered in .github/workflows/build.yml and submitted as #7. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.