Skip to content

Commit 28ad1b7

Browse files
committed
.gitlab-ci.yml: Add code-format job.
Signed-off-by: lbuque <[email protected]>
1 parent 941a1d5 commit 28ad1b7

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.gitlab-ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,26 @@ cache:
99
- $ESP_IDF_SRC_DIR
1010

1111
stages:
12+
- code_format
1213
- build
1314
- docs
1415
- release
1516

1617

18+
code-format:
19+
stage: code_format
20+
script:
21+
- source tools/ci.sh && ci_code_formatting_setup
22+
- source tools/ci.sh && ci_code_formatting_run
23+
tags:
24+
- uiflow-firmware
25+
only:
26+
changes:
27+
- "m5stack/**"
28+
- "examples/**"
29+
- "tests/**"
30+
- "third-party/**"
31+
1732
build-job:
1833
stage: build
1934
script:

tests/hardware/button_cb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
from M5 import Lcd, BtnA, BtnB, BtnC
99

1010

11-
def btnA_wasPressed_cb(state):
11+
def btnA_wasPressed_cb(state): # noqa: N802
1212
Lcd.clear(random.randint(0, 0xFFFF))
1313
Lcd.setCursor(0, 0)
1414
Lcd.print("btnA_wasPressed_cb")
1515

1616

17-
def btnB_wasHold_cb(state):
17+
def btnB_wasHold_cb(state): # noqa: N802
1818
Lcd.clear(random.randint(0, 0xFFFF))
1919
Lcd.setCursor(0, 0)
2020
Lcd.print("btnB_wasHold_cb")
2121

2222

23-
def btnC_wasDoubleClicked_cb(state):
23+
def btnC_wasDoubleClicked_cb(state): # noqa: N802
2424
Lcd.clear(random.randint(0, 0xFFFF))
2525
Lcd.setCursor(0, 0)
2626
Lcd.print("btnC_wasDoubleClicked_cb")

0 commit comments

Comments
 (0)