Skip to content

Commit 2f08c79

Browse files
committed
modifying elrons pr to run with uv on many py versions
1 parent e7c7f93 commit 2f08c79

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/quality.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
- uses: actions/setup-python@v5
23+
- name: Install uv and set the python version
24+
uses: astral-sh/setup-uv@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
enable-cache: true
28+
- name: pre-commit cache key
29+
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> "$GITHUB_ENV"
30+
- uses: actions/cache@v4
31+
with:
32+
path: ~/.cache/pre-commit
33+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
34+
- name: Install dependencies
35+
run: uv sync --frozen --all-extras
36+
- name: Check style and run tests
37+
run: pre-commit run --all-files
38+
- name: Send failure message
39+
if: failure() # This step will only run if a previous step failed
40+
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)