Skip to content

Commit 9f14699

Browse files
committed
moving things into a workflows folder
1 parent 2f08c79 commit 9f14699

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/quality.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Verify Code Quality & Security
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
quality:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 30
17+
strategy:
18+
matrix:
19+
python-version: ['3.9', '3.10', '3.11', '3.12'] # Need to add 3.13 once we resolve outlines issues.
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Install uv and set the python version
23+
uses: astral-sh/setup-uv@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
enable-cache: true
27+
- name: pre-commit cache key
28+
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> "$GITHUB_ENV"
29+
- uses: actions/cache@v4
30+
with:
31+
path: ~/.cache/pre-commit
32+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
33+
- name: Install dependencies
34+
run: uv sync --frozen --all-extras
35+
- name: Check style and run tests
36+
run: pre-commit run --all-files
37+
- name: Send failure message
38+
if: failure() # This step will only run if a previous step failed
39+
run: echo "The quality & security verification failed. This is likely due to not using pre-commit hooks please run 'pre-commit install' before any commit."

0 commit comments

Comments
 (0)