mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
chore: pre-commit improvements (#348)
##### SUMMARY - Speed up pre-commit by moving some tasks out of pre-commit - Move network related hooks out of pre-commit (allow enabling pre-commit.ci) - Some optimization - Use pre-commit.ci
This commit is contained in:
parent
7f4e4e96cc
commit
9eab32cf3d
7 changed files with 311 additions and 306 deletions
10
.github/workflows/lint.yml
vendored
10
.github/workflows/lint.yml
vendored
|
|
@ -6,7 +6,7 @@ on:
|
|||
pull_request:
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
@ -15,9 +15,11 @@ jobs:
|
|||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
cache: pip
|
||||
cache-dependency-path: requirements.txt
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install pre-commit
|
||||
run: make venv
|
||||
|
||||
- name: Run pre-commit
|
||||
run: pre-commit run --all-files --show-diff-on-failure
|
||||
- name: Lint docs
|
||||
run: make lint-docs
|
||||
|
|
|
|||
26
.github/workflows/vendor.yml
vendored
Normal file
26
.github/workflows/vendor.yml
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
name: Vendor
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, stable-1]
|
||||
paths:
|
||||
- plugins/module_utils/vendor/**
|
||||
- scripts/vendor.py
|
||||
pull_request:
|
||||
paths:
|
||||
- plugins/module_utils/vendor/**
|
||||
- scripts/vendor.py
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
- name: Ensure vendors are not diverging
|
||||
run: make vendor-check
|
||||
Loading…
Add table
Add a link
Reference in a new issue