Skip to content

Commit

Permalink
Use JHlite: init, prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalgrimaud committed Jul 13, 2024
1 parent 17b168b commit c8a4378
Show file tree
Hide file tree
Showing 18 changed files with 1,915 additions and 55 deletions.
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
112 changes: 64 additions & 48 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,70 @@
name: Build
on: [push, pull_request]
inputs:
node-version:
description: 'Node version to use'
required: true
default: 'lts/*'
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
- name: Checkout
uses: actions/checkout@v2
- name: 'Setup: Node.js'
uses: actions/setup-node@v4
with:
node-version: '${{ inputs.node-version }}'
check-latest: true
- name: 'Setup: update NPM'
shell: bash
run: npm install -g npm
- name: Check docker version
run: docker version
- name: Test formatting with prettier
run: npm run prettier:check
- 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

0 comments on commit c8a4378

Please sign in to comment.