-
Notifications
You must be signed in to change notification settings - Fork 6
30 lines (26 loc) · 990 Bytes
/
pre-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Pre CI
on:
# Workflow dispatch is used for manual triggers
workflow_dispatch:
# Workflow call is used for called from another workflow
workflow_call:
jobs:
pre-commit: # Static analyzers, formatters and verifying pre-commit hooks has been run for both API and Web
name: Build & Run Pre Commit hooks to verify code structure, quality etc. from pre-commit hooks
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install pre-commit
run: python -m pip install -r pre-commit-requirements.txt
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
run: SKIP=trufflehog pre-commit run --all-files --verbose