-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (46 loc) · 1.53 KB
/
test-hooks.yml
File metadata and controls
59 lines (46 loc) · 1.53 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Test Pre-commit Hooks
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # Run weekly on Sundays at midnight UTC
jobs:
test-system-hook:
name: Test pyrefly hook (system-hook example)
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install uv
run: pip install uv
- name: Install dependencies
working-directory: examples/system-hook
run: uv pip install -r pyproject.toml --group dev --system
- name: Run pre-commit on system-hook example
working-directory: examples/system-hook
run: pre-commit run --all-files --show-diff-on-failure
test-specific-version-hook:
name: Test pyrefly hook (specific-version-hook example)
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install uv
run: pip install uv
- name: Install dependencies
working-directory: examples/specific-version-hook
run: uv pip install -r pyproject.toml --group dev --system
- name: Run pre-commit on specific-version-hook example
working-directory: examples/specific-version-hook
run: pre-commit run --all-files --show-diff-on-failure