-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (87 loc) · 2.51 KB
/
ci.yml
File metadata and controls
96 lines (87 loc) · 2.51 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
shellcheck:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Run ShellCheck
run: shellcheck scripts/*.sh
shfmt:
name: shfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install shfmt
run: |
SHFMT_VERSION=3.10.0
curl -sS -L "https://github.com/mvdan/sh/releases/download/v${SHFMT_VERSION}/shfmt_v${SHFMT_VERSION}_linux_amd64" -o /usr/local/bin/shfmt
chmod +x /usr/local/bin/shfmt
- name: Check formatting
run: shfmt -d scripts/*.sh
markdownlint:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: DavidAnson/markdownlint-cli2-action@v23
with:
globs: '**/*.md'
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Run Prettier check
run: npx prettier@3 --check '**/*.{json,yml,yaml,md}' --ignore-path .prettierignore
ruff:
name: Ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install Ruff
run: pip install ruff
- name: Check linting
run: ruff check clickwheel/
- name: Check formatting
run: ruff format --check clickwheel/
test:
name: Tests (${{ matrix.os }}, ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install package with dev dependencies
run: pip install -e ".[dev]"
- name: Run tests with coverage
run: python -m pytest tests/ -v --tb=short --cov-report=xml
- name: Upload coverage
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v5
with:
files: coverage.xml
fail_ci_if_error: false
claude-lint:
name: Claude Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Run claude-code-lint
run: npx claude-code-lint@latest