File tree Expand file tree Collapse file tree 4 files changed +122
-0
lines changed Expand file tree Collapse file tree 4 files changed +122
-0
lines changed Original file line number Diff line number Diff line change 99 - pyproject.toml
1010
1111jobs :
12+ lint :
13+ uses : ./.github/workflows/lint.yml
14+
1215 build :
1316 name : Build
1417 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths-ignore :
8+ - pyproject.toml
9+ pull_request :
10+ branches :
11+ - main
12+
13+ jobs :
14+ commit-lint :
15+ if : ${{ github.event_name == 'pull_request' }}
16+ uses : ./.github/workflows/commitlint.yml
17+
18+ lint :
19+ uses : ./.github/workflows/lint.yml
Original file line number Diff line number Diff line change 1+ name : Commit Lint
2+
3+ on :
4+ workflow_call
5+
6+ jobs :
7+ commitlint :
8+ name : Commit Lint
9+ runs-on : ubuntu-latest
10+ permissions :
11+ contents : read
12+
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+ with :
17+ fetch-depth : 0
18+
19+ - name : Setup Node
20+ uses : actions/setup-node@v3
21+ with :
22+ node-version : 22
23+
24+ - name : Install Git
25+ run : |
26+ if ! command -v git &> /dev/null; then
27+ echo "Git is not installed. Installing..."
28+ sudo apt-get update
29+ sudo apt-get install -y git
30+ else
31+ echo "Git is already installed."
32+ fi
33+
34+ - name : Install commitlint
35+ run : |
36+ npm install conventional-changelog-conventionalcommits
37+ npm install commitlint@latest
38+ npm install @commitlint/config-conventional
39+
40+ - name : Configure
41+ run : |
42+ echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
43+
44+ - name : Validate PR commits with commitlint
45+ run : |
46+ git fetch origin pull/${{ github.event.pull_request.number }}/head:pr_branch
47+ npx commitlint --from ${{ github.event.pull_request.base.sha }} --to pr_branch --verbose
Original file line number Diff line number Diff line change 1+ name : Lint
2+
3+ on :
4+ workflow_call
5+
6+ jobs :
7+ # Job that runs when custom version testing is enabled - just completes successfully
8+ skip-lint :
9+ name : Skip Lint (Custom Version Testing)
10+ runs-on : ubuntu-latest
11+ if : contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')
12+ permissions :
13+ contents : read
14+ steps :
15+ - name : Skip lint for custom version testing
16+ run : |
17+ echo "Custom version testing enabled - skipping normal lint process"
18+ echo "This job completes successfully to allow PR merging"
19+
20+ # Job that runs normal lint process when custom version testing is NOT enabled
21+ lint :
22+ name : Lint
23+ runs-on : ubuntu-latest
24+ if : " !contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')"
25+ permissions :
26+ contents : read
27+
28+ steps :
29+ - name : Checkout
30+ uses : actions/checkout@v4
31+
32+ - name : Setup uv
33+ uses : astral-sh/setup-uv@v5
34+ with :
35+ enable-cache : true
36+
37+ - name : Setup Python
38+ uses : actions/setup-python@v5
39+ with :
40+ python-version-file : " .python-version"
41+
42+ - name : Install dependencies
43+ run : uv sync --all-extras
44+
45+ - name : Check static types
46+ run : uv run mypy --config-file pyproject.toml .
47+
48+ - name : Check linting
49+ run : uv run ruff check .
50+
51+ - name : Check formatting
52+ run : uv run ruff format --check .
53+
You can’t perform that action at this time.
0 commit comments