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

De-centralize YAML and Markdown stylecheck #12

Merged
merged 1 commit into from
Nov 17, 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
43 changes: 37 additions & 6 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
name: Template CI/CD
name: CI/CD

"on":
pull_request:
Expand All @@ -27,17 +27,48 @@ env:
EMAIL: jack20220723@gmail.com

jobs:
yml-md-style-and-link-checks:
uses: QubitPi/hashistack/.github/workflows/yml-md-style-and-link-checks.yml@master
cancel-previous:
name: Cancel Previous Runs In Order to Allocate Action Resources Immediately for Current Run
if: github.ref != 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.10.1
with:
access_token: ${{ github.token }}

yaml-lint:
name: YAML Style Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actionshub/yamllint@main

markdown-lint:
name: Markdown Style Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actionshub/markdownlint@main

linkChecker:
name: Link Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Link Checker
uses: lycheeverse/lychee-action@v1.9.0
with:
fail: true

tests:
name: Unit & Integration Tests
needs: yml-md-style-and-link-checks
needs: [yaml-lint, markdown-lint, linkChecker]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test environment setup
uses: ./.github/actions/ci-setup
- name: Set up JDK
uses: QubitPi/jersey-webservice-deployment-actions/.github/actions/jdk-setup@master
- name: Set up Docker for Integration Tests
uses: docker-practice/actions-setup-docker@master
- name: Run unit & integration tests
Expand Down
3 changes: 0 additions & 3 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
file:///*
https://querydsl.com/*
https://uel.java.net/
https://www.openapis.org/
https://api.paion-data.dev/*
2 changes: 2 additions & 0 deletions .mdlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rules "~MD002", "~MD003", "~MD005", "~MD007", "~MD013", "~MD022", "~MD024", "~MD027", "~MD028", "~MD029", "~MD033", "~MD034", "~MD036", "~MD041", "~MD055", "~MD057"
style "#{File.dirname(__FILE__)}/markdownlint.rb"
23 changes: 23 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
extends: default
rules:
line-length:
max: 256
level: warning
document-start: disable
braces:
forbid: false
min-spaces-inside: 0
max-spaces-inside: 1
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
commas:
max-spaces-before: -1
min-spaces-after: 1
max-spaces-after: -1
brackets:
max-spaces-inside: -1
empty-lines:
max: 3
indentation:
spaces: 2
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ mvn clean verify
Deployment
----------

This is a one-person project. Agility outplays team scaling, so deployment is manual and pretty much follows
[jetty-start.sh](./jetty-start.sh)
At this moment deployment is manual and pretty much follows [jetty-start.sh](./jetty-start.sh)

### Sending Logs to ELK Cloud

Expand Down Expand Up @@ -76,7 +75,7 @@ curl -i -k -X POST https://api.paion-data.dev:8444/services/wilhelm-ws-search/ro

We should see `HTTP/1.1 201 Created` as signs of success.

#### Example requests:
#### Example requests

- vocabulary count: https://api.paion-data.dev/wilhelm/languages/german?perPage=100&page=1
- query vocabulary paged: https://api.paion-data.dev/wilhelm/languages/german/count
Expand Down
14 changes: 6 additions & 8 deletions .github/actions/ci-setup/action.yml → markdownlint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'setup'
description: 'CI setup, such as installing JDK'

runs:
using: "composite"
steps:
- name: Set up JDK
uses: QubitPi/jersey-webservice-deployment-actions/.github/actions/jdk-setup@master
all
rule 'MD003', style: :setext_with_atx
rule 'MD004', style: :sublist
rule 'MD013', line_length: 120
rule 'MD029', style: :ordered
rule 'MD026', punctuation: ".,;:!?"
Loading