Skip to content

Commit

Permalink
dev: consistent CI workflow& configs
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalli-johnny committed Apr 2, 2024
1 parent 8f2852e commit 5426af9
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 14 deletions.
10 changes: 8 additions & 2 deletions .github/config/markdown-lint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,19 @@
"MD045": true,

// MD046/code-block-style - Code block style
"MD046": false,
"MD046": {
// Block style
"style": "consistent"
},

// MD047/single-trailing-newline - Files should end with a single newline character
"MD047": true,

// MD048/code-fence-style - Code fence style
"MD048": false,
"MD048": {
// Code fence style
"style": "consistent"
},

// MD049/emphasis-style - Emphasis style should be consistent
"MD049": {
Expand Down
14 changes: 11 additions & 3 deletions .github/config/megalinter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
# Configuration file for MegaLinter
#
# General configuration:
# https://oxsecurity.github.io/megalinter/configuration/
# https://megalinter.io/latest/configuration/
#
# Specific Linters:
# https://oxsecurity.github.io/megalinter/latest/supported-linters/
# https://megalinter.io/latest/supported-linters/

# ------------------------
# Validate all files if true
# or new / edited files if false
VALIDATE_ALL_CODEBASE: false

# ------------------------
# Linters
Expand All @@ -29,6 +34,7 @@ ENABLE:

# CLOJURE_CLJ_KONDO_CONFIG_FILE: ".github/config/clj-kondo-ci-config.edn"
# CLOJURE_CLJ_KONDO_ARGUMENTS: "--lint deps.edn"
# CLOJURE_CLJ_KONDO_FILTER_REGEX_EXCLUDE: "dev|develop"
# CLOJURE_CLJ_KONDO_FILTER_REGEX_EXCLUDE: "resources"

# CREDENTIALS_SECRETLINT_DISABLE_ERRORS: true
Expand All @@ -43,11 +49,13 @@ MARKDOWN_MARKDOWN_LINK_CHECK_CONFIG_FILE: ".github/config/markdown-link-check.js
MARKDOWN_REMARK_LINT_DISABLE_ERRORS: true
# MARKDOWN_MARKDOWN_TABLE_FORMATTER_DISABLE_ERRORS: false

REPOSITORY_GITLEAKS_CONFIG_FILE: ".github/config/gitleaks.toml"
REPOSITORY_TRUFFLEHOG_DISABLE_ERRORS: true # Errors only as warnings

# SPELL_CSPELL_DISABLE_ERRORS: true
SPELL_MISSPELL_DISABLE_ERRORS: true
SPELL_LYCHEE_DISABLE_ERRORS: true # Errors are only warnings
SPELL_LYCHEE_CONFIG_FILE: ".github/config/lychee.toml"
# SPELL_LYCHEE_DISABLE_ERRORS: true # Errors are only warnings

# YAML_PRETTIER_FILTER_REGEX_EXCLUDE: (docs/)
# YAML_YAMLLINT_FILTER_REGEX_EXCLUDE: (docs/)
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/changelog-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
name: Changelog Check
on:
pull_request:
paths-ignore:
- "README.md"
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
Expand All @@ -15,14 +17,19 @@ jobs:
- run: echo "🐧 Job running on ${{ runner.os }} server"
- run: echo "🐙 Using ${{ github.ref }} branch from ${{ github.repository }} repository"

# Git Checkout
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: |
docs
overrides
.github
CHANGELOG.md
- run: echo "🐙 ${{ github.repository }} repository sparse-checkout to the CI runner."
- run: echo "🐙 Sparse Checkout of ${{ github.repository }} repository to the CI runner."

# Changelog Enforcer
- name: Changelog Enforcer
uses: dangoslen/changelog-enforcer@v3
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/megalinter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4
with:
token: "${{ secrets.PAT || secrets.GITHUB_TOKEN }}"
fetch-depth: 0
sparse-checkout: |
docs
Expand All @@ -55,7 +54,7 @@ jobs:
# Upload MegaLinter artifacts
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: MegaLinter reports
path: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/publish-book.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ jobs:
docs
overrides
- run: echo "🐙 ${{ github.repository }} repository sparse-checkout to the CI runner."

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ github.ref }}
path: .cache
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/scheduled-version-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ jobs:
- run: echo "🐧 Job running on ${{ runner.os }} server"
- run: echo "🐙 Using ${{ github.ref }} branch from ${{ github.repository }} repository"

- name: "Checkout code"
- name: Checkout Code
uses: actions/checkout@v4
- run: echo "🐙 ${{ github.repository }} repository was cloned to the runner."

with:
fetch-depth: 0
sparse-checkout: |
.github
- run: echo "🐙 ${{ github.repository }} repository sparse-checkout to the CI runner."
- name: "Antq Check versions"
uses: liquidz/antq-action@main
with:
Expand All @@ -44,4 +47,3 @@ jobs:
# Summary
- run: echo "🎨 library versions checked with liquidz/antq"
- run: echo "🍏 Job status is ${{ job.status }}."

0 comments on commit 5426af9

Please sign in to comment.