🧪 Add check-jsonschema hooks to pre-commit cfg
This commit is contained in:
@@ -10,22 +10,26 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
failing-job:
|
failing-job:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- run: exit 1
|
- run: exit 1
|
||||||
|
|
||||||
succeeding-job:
|
succeeding-job:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- run: exit 0
|
- run: exit 0
|
||||||
|
|
||||||
skipped-job:
|
skipped-job:
|
||||||
if: false
|
if: false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- run: exit 0
|
- run: exit 0
|
||||||
|
|
||||||
partially-failing-partially-skipped-matrix:
|
partially-failing-partially-skipped-matrix:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
continue-on-error: ${{ matrix.rc == '1' }}
|
continue-on-error: ${{ matrix.rc == '1' }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -43,6 +47,7 @@ jobs:
|
|||||||
- skipped-job
|
- skipped-job
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the src from Git
|
- name: Checkout the src from Git
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -64,6 +69,7 @@ jobs:
|
|||||||
- skipped-job
|
- skipped-job
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the src from Git
|
- name: Checkout the src from Git
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -86,6 +92,7 @@ jobs:
|
|||||||
- skipped-job
|
- skipped-job
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the src from Git
|
- name: Checkout the src from Git
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -108,6 +115,7 @@ jobs:
|
|||||||
- skipped-job
|
- skipped-job
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the src from Git
|
- name: Checkout the src from Git
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -132,6 +140,7 @@ jobs:
|
|||||||
- skipped-job
|
- skipped-job
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the src from Git
|
- name: Checkout the src from Git
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -155,6 +164,7 @@ jobs:
|
|||||||
- skipped-job
|
- skipped-job
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the src from Git
|
- name: Checkout the src from Git
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -179,6 +189,7 @@ jobs:
|
|||||||
- skipped-job
|
- skipped-job
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the src from Git
|
- name: Checkout the src from Git
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -203,6 +214,7 @@ jobs:
|
|||||||
- partially-failing-partially-skipped-matrix
|
- partially-failing-partially-skipped-matrix
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the src from Git
|
- name: Checkout the src from Git
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -232,6 +244,7 @@ jobs:
|
|||||||
- allow-partials
|
- allow-partials
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the src from Git
|
- name: Checkout the src from Git
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -28,4 +28,21 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: remove-tabs
|
- id: remove-tabs
|
||||||
|
|
||||||
|
- repo: https://github.com/python-jsonschema/check-jsonschema.git
|
||||||
|
rev: 0.33.2
|
||||||
|
hooks:
|
||||||
|
- id: check-github-workflows
|
||||||
|
files: ^\.github/workflows/[^/]+$
|
||||||
|
types:
|
||||||
|
- yaml
|
||||||
|
- id: check-jsonschema
|
||||||
|
name: Check GitHub Workflows set timeout-minutes
|
||||||
|
args:
|
||||||
|
- --builtin-schema
|
||||||
|
- github-workflows-require-timeout
|
||||||
|
files: ^\.github/workflows/[^/]+$
|
||||||
|
types:
|
||||||
|
- yaml
|
||||||
|
- id: check-readthedocs
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|||||||
Reference in New Issue
Block a user