Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JHlite: init, prettier #10

Merged
merged 3 commits into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Change these settings to your own preference
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
152 changes: 152 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# This file is inspired by https://github.com/alexkaratarakis/gitattributes
#
# Auto detect text files and perform LF normalization
* text=auto

# The above will handle all files NOT found below
# These files are text and should be normalized (Convert crlf => lf)

*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.coffee text
*.css text
*.cql text
*.df text
*.ejs text
*.feature text
*.html text
*.java text
*.js text
*.json text
*.kts text
*.less text
*.properties text
*.sass text
*.scss text
*.sh text eol=lf
*.sql text
*.txt text
*.toml text
*.ts text
*.xml text
*.yaml text
*.yml text

# Documents
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.markdown text
*.md text
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text

# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as an asset (binary) by default. If you want to treat it as text,
# comment-out the following line and uncomment the line after.
*.svg binary
#*.svg text
*.eps binary

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class binary
*.jar binary
*.war binary

## LINTERS
.csslintrc text
.eslintrc text
.jscsrc text
.jshintrc text
.jshintignore text
.stylelintrc text

## CONFIGS
*.conf text
*.config text
.editorconfig text
.gitattributes text
.gitconfig text
.gitignore text
.htaccess text
*.npmignore text

## HEROKU
Procfile text
.slugignore text

## AUDIO
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary

## VIDEO
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.swc binary
*.swf binary
*.webm binary

## ARCHIVES
*.7z binary
*.gz binary
*.rar binary
*.tar binary
*.zip binary

## FONTS
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary
131 changes: 82 additions & 49 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,87 @@
name: Build
on: [push, pull_request]
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check docker version
run: docker version
- name: Build Docker image
run: |
docker build -q -t ansible:test .
docker images
- name: Start Docker container
run: docker run --name containertest -d -w /home/jhipster/app/playbooks/ ansible:test
- name: Display ansible version
run: docker exec -t containertest ansible --version
- name: tools
run: |
docker exec -t containertest ansible-playbook tools.yml -e ansible_become_pass=jhipster
docker exec -t containertest vim --version
docker exec -t containertest curl --version
docker exec -t containertest wget --version
- name: git
run: |
docker exec -t containertest ansible-playbook git.yml -e ansible_become_pass=jhipster -e 'git_username="Firstname Lastname"' -e git_email=yourmail@localhost
docker exec -t containertest git version
- name: zsh
run: |
docker exec -t containertest ansible-playbook zsh.yml -e ansible_become_pass=jhipster
docker exec -t containertest zsh --version
- name: openjdk21
run: |
docker exec -t containertest ansible-playbook openjdk21.yml -e ansible_become_pass=jhipster
docker exec -t containertest java -version
docker exec -t containertest javac -version
- name: Maven
run: |
docker exec -t containertest ansible-playbook maven.yml -e ansible_become_pass=jhipster -e maven_version=3.9.6
docker exec -t containertest mvn -version
- name: NodeJS
run: |
docker exec -t containertest ansible-playbook node.yml -e ansible_become_pass=jhipster -e node_version=20.15.1
docker exec -t containertest node -v
docker exec -t containertest npm -v
- name: docker
run: |
docker exec -t containertest ansible-playbook docker.yml -e ansible_become_pass=jhipster -u jhipster
docker exec -t containertest docker -v
docker exec -t containertest groups jhipster
- name: docker-compose
run: |
docker exec -t containertest ansible-playbook dockercompose.yml -e ansible_become_pass=jhipster -e docker_compose_version=2.5.1
docker exec -t containertest docker-compose version
#--------------------------------------------------
# Checkout and install tools
#--------------------------------------------------
- name: Checkout
uses: actions/checkout@v2
- name: 'Setup: Node.js'
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
check-latest: true
- name: 'Setup: update NPM'
shell: bash
run: npm install -g npm
- name: 'Setup: check tools'
shell: bash
run: |
node -v
npm -v
docker version
#--------------------------------------------------
# Test formatting with prettier
#--------------------------------------------------
- name: 'Init: install Node.js packages'
run: npm ci
- name: Test formatting with prettier
run: npm run prettier:check
#--------------------------------------------------
# Test ansible roles in Docker container
#--------------------------------------------------
- name: Build Docker image
run: |
docker build -q -t ansible:test .
docker images
- name: Start Docker container
run: docker run --name containertest -d -w /home/jhipster/app/playbooks/ ansible:test
- name: Display ansible version
run: docker exec -t containertest ansible --version
- name: tools
run: |
docker exec -t containertest ansible-playbook tools.yml -e ansible_become_pass=jhipster
docker exec -t containertest vim --version
docker exec -t containertest curl --version
docker exec -t containertest wget --version
- name: git
run: |
docker exec -t containertest ansible-playbook git.yml -e ansible_become_pass=jhipster -e 'git_username="Firstname Lastname"' -e git_email=yourmail@localhost
docker exec -t containertest git version
- name: zsh
run: |
docker exec -t containertest ansible-playbook zsh.yml -e ansible_become_pass=jhipster
docker exec -t containertest zsh --version
- name: openjdk21
run: |
docker exec -t containertest ansible-playbook openjdk21.yml -e ansible_become_pass=jhipster
docker exec -t containertest java -version
docker exec -t containertest javac -version
- name: Maven
run: |
docker exec -t containertest ansible-playbook maven.yml -e ansible_become_pass=jhipster -e maven_version=3.9.6
docker exec -t containertest mvn -version
- name: NodeJS
run: |
docker exec -t containertest ansible-playbook node.yml -e ansible_become_pass=jhipster -e node_version=20.15.1
docker exec -t containertest node -v
docker exec -t containertest npm -v
- name: docker
run: |
docker exec -t containertest ansible-playbook docker.yml -e ansible_become_pass=jhipster -u jhipster
docker exec -t containertest docker -v
docker exec -t containertest groups jhipster
- name: docker-compose
run: |
docker exec -t containertest ansible-playbook dockercompose.yml -e ansible_become_pass=jhipster -e docker_compose_version=2.5.1
docker exec -t containertest docker-compose version
Loading
Loading