-
Notifications
You must be signed in to change notification settings - Fork 267
62 lines (57 loc) · 1.72 KB
/
Copy pathlint.yml
File metadata and controls
62 lines (57 loc) · 1.72 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
name: Lint
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CMAKE_INSTALL_MESSAGE: NEVER
CMAKE_LOG_LEVEL: WARNING
MAKEFLAGS: --silent
jobs:
lint:
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
POETRY_VIRTUALENVS_IN_PROJECT: "true"
steps:
- uses: actions/checkout@v6
- id: python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Cache Python tools
id: python-tools-cache
uses: actions/cache@v5
with:
path: .ci-tools
key: python-tools-${{ runner.os }}-${{ steps.python.outputs.python-version }}-clang-format-22.1.8-poetry-2.4.1
- name: Cache Poetry environment
uses: actions/cache@v5
with:
path: .venv
key: poetry-${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ hashFiles('poetry.lock', 'pyproject.toml') }}
restore-keys: |
poetry-${{ runner.os }}-${{ steps.python.outputs.python-version }}-
- name: Install Python tools
if: steps.python-tools-cache.outputs.cache-hit != 'true'
run: |
python -m venv .ci-tools
.ci-tools/bin/python -m pip install --quiet --disable-pip-version-check "clang-format==22.1.8" "poetry==2.4.1"
- name: Add Python tools to PATH
run: echo "$GITHUB_WORKSPACE/.ci-tools/bin" >> "$GITHUB_PATH"
- name: Lint
run: |
make api-generate
make format
make lint
git diff --exit-code
git status --short
test -z "$(git status --porcelain)"