-
Notifications
You must be signed in to change notification settings - Fork 130
58 lines (47 loc) · 1.28 KB
/
lint.yml
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
name: Lint tree and check format
on:
push:
branches:
- master
paths:
- 'main/**'
- 'user/**'
- 'src/**'
pull_request:
branches:
- master
paths:
- 'main/**'
- 'user/**'
- 'src/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: 1
jobs:
lint:
name: Lint tree and check format
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: classabbyamp/treeless-checkout-action@v1
- name: Disable apparmor
run: |
sudo sysctl kernel.apparmor_restrict_unprivileged_unconfined=0
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0
- name: Install python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install ruff
run: python -m pip install ruff --break-system-packages
- name: Install apt dependencies
run: |
sudo rm -f /var/lib/man-db/auto-update
sudo apt-get update
sudo apt-get install --no-install-recommends ca-certificates openssl git bubblewrap wget
- name: Set up cbuild configuration
run: sh .ci/setup-cbuild.sh
- name: Run checks and lints
run: sh .ci/lint.sh