1
0
Fork 0
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:
Jonas L 2023-10-06 16:02:46 +02:00 committed by GitHub
parent 7f4e4e96cc
commit 9eab32cf3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 311 additions and 306 deletions

View file

@ -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
View 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