Skip to content

Commit

Permalink
Add GHA configuration and folder placeholers
Browse files Browse the repository at this point in the history
  • Loading branch information
iranzo authored and kwozyman committed Nov 6, 2024
1 parent 8d6ce6b commit b5c7465
Show file tree
Hide file tree
Showing 8 changed files with 183 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: build
prefix-development: chore
include: scope
16 changes: 16 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# Add 'repo' label to any root file changes
repo:
- ./*

documentation:
- doc/**/*

modules:
- modules/*

fab:
- fab/*

ci:
- tests/**/*
14 changes: 14 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "Label PRs from globs"
on:
schedule:
- cron: "0 * * * *"

jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: jpmcb/[email protected]
with:
jobs: 'pr-labeler'
github-token: "${{ secrets.GITHUB_TOKEN }}"
27 changes: 27 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: pre-commit

on:
pull_request:
push:
branches: [master]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: |
~/.cache/pre-commit
key: ${{ runner.os }}-precommit-${{ hashFiles('**/.pre-commit-config.yaml/*') }}
restore-keys: |
${{ runner.os }}-precommit-
- uses: pre-commit/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@





node_modules/*
98 changes: 98 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
fail_fast: true
repos:
- hooks:
- id: commitizen
stages:
- commit-msg
repo: https://github.com/commitizen-tools/commitizen
rev: v3.30.0
- hooks:
- id: check-useless-excludes
repo: meta
- hooks:
- files: \.(css|js|md|markdown|json)
id: prettier
repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
- hooks:
- id: black
repo: https://github.com/python/black
rev: 24.10.0
- hooks:
- id: check-added-large-files
args: [--maxkb=10000]
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-vcs-permalinks
- id: debug-statements
- id: check-xml
- args:
- --unsafe
id: check-yaml
- id: end-of-file-fixer
- id: forbid-new-submodules
- args:
- --branch
- gh-pages
id: no-commit-to-branch
- id: requirements-txt-fixer
- id: sort-simple-yaml
- id: trailing-whitespace
- id: mixed-line-ending
- id: detect-private-key
- id: check-byte-order-marker
- id: check-docstring-first
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.2
hooks:
# Run the linter.
- id: ruff
args:
- --fix
# Run the formatter.
- id: ruff-format

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.10.0-1
hooks:
# Choose one of:
- id: shfmt # native (requires/installs Go to build)
args:
- -w
- -i
- "4"
- -s
types:
- shell

- hooks:
- id: blacken-docs
repo: https://github.com/asottile/blacken-docs
rev: 1.19.1

# - repo: https://github.com/asottile/pyupgrade
# rev: v2.38.0
# hooks:
# - id: pyupgrade
# args: [--py39-plus]

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3 # or other specific tag
hooks:
- id: yamlfmt
args: [--mapping, "2", --sequence, "4", --offset, "2", "--preserve-quotes"]

# - repo: https://github.com/hcodes/yaspeller.git
# rev: v10.0.1
# hooks:
# - id: yaspeller
# types:
# - markdown
Empty file added doc/.placeholder
Empty file.
Empty file added tests/.placeholder
Empty file.

0 comments on commit b5c7465

Please sign in to comment.