Skip to content

Commit

Permalink
updated CI CD yaml files with new versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Milstein committed Aug 1, 2024
1 parent d3804bd commit f5ba6f9
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 44 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ name: Build and Deploy Documentation using MkDocs
# but pull request events on any branch but deployement happens only for the main branch
on:
push:
branches:
- main
branches: [main]
pull_request:
# branches: [main]
# branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -24,21 +23,21 @@ jobs:
python-version: [3.10.12]

steps:
- name: Checkout Main
uses: actions/checkout@v4
- name: Checkout Main
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and setup git config
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
git config user.name 'github-actions[bot]' && git config user.email '[email protected]'
- name: Clean Build
run: |
mkdocs build --clean
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and setup git config
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
git config user.name 'github-actions[bot]' && git config user.email '[email protected]'
- name: Clean Build
run: |
mkdocs build --clean
deploy:
name: Deploy Documentation
needs: build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/precommit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '^3.10'
python-version: ^3.10

- name: Configure caching
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"default": true,
"MD013": {"code_blocks": false, "tables": false, "headings": false}
"MD013": { "code_blocks": false, "tables": false, "headings": false }
}
6 changes: 6 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for all rules.
default: true
MD013:
code_blocks: false
tables: false
headings: false
53 changes: 32 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,63 @@
---
ci:
autofix_commit_msg: "style(pre-commit): autofix"
autoupdate_commit_msg: "ci(pre-commit): autoupdate"

repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.10
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.6.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-merge-conflict
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-yaml
args:
- '--allow-multiple-documents'
args: [--unsafe, --allow-multiple-documents]
- id: check-symlinks
- id: detect-private-key

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.3
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
exclude: .*.param.yaml

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.29.0
rev: v0.40.0
hooks:
- id: markdownlint
- id: markdownlint
args: [-c, .markdownlint.yaml, --fix]

- repo: https://github.com/Yelp/detect-secrets
rev: v1.1.0
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: .*/tests/.*
- id: detect-secrets
args: [--baseline, .secrets.baseline]
exclude: .*/tests/.*

- repo: https://github.com/pycqa/flake8
rev: '4.0.1'
rev: 7.0.0
hooks:
- id: flake8
args:
# these are errors that will be ignored by flake8
# check out their meaning here
# https://flake8.pycqa.org/en/latest/user/error-codes.html
- '--ignore=E501,F401'
exclude: ^testing/(data|examples)/
- id: flake8
args:
# these are errors that will be ignored by flake8
# check out their meaning here
# https://flake8.pycqa.org/en/latest/user/error-codes.html
- --ignore=E501,F401
exclude: ^testing/(data|examples)/

exclude: .svg
23 changes: 19 additions & 4 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
---
extends: default

ignore: |
*.param.yaml
rules:
line-length: disable
document-start: disable
braces:
level: error
max-spaces-inside: 1 # To format with Prettier
comments:
level: error
min-spaces-from-content: 1 # To be compatible with C++ and Python
document-start:
level: error
present: false # Don't need document start markers
line-length: disable # Delegate to Prettier
indentation:
indent-sequences: whatever
hyphens:
max-spaces-after: 4
truthy:
check-keys: false
level: error
check-keys: false # To allow 'on' of GitHub Actions
quoted-strings:
level: error
required: only-when-needed # To keep consistent style

0 comments on commit f5ba6f9

Please sign in to comment.