Skip to content

Commit fa6900b

Browse files
authored
Merge pull request #2 from jwillikers/ci
Improve CI
2 parents 2bca305 + 3adc28a commit fa6900b

File tree

7 files changed

+60
-23
lines changed

7 files changed

+60
-23
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/lint.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Lint
2+
on: # yamllint disable-line rule:truthy
3+
pull_request:
4+
branches: ["main"]
5+
6+
permissions:
7+
checks: write
8+
contents: read
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
just:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: extractions/setup-just@v1
18+
with:
19+
just-version: "1.24.0"
20+
- name: Format justfile
21+
run: just --fmt --unstable
22+
- uses: reviewdog/action-suggester@v1
23+
with:
24+
tool_name: just
25+
ruff:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: Set up Python 3.11
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: "3.11"
33+
- uses: chartboost/ruff-action@v1
34+
with:
35+
args: format
36+
- uses: chartboost/ruff-action@v1
37+
with:
38+
args: check --fix
39+
- uses: reviewdog/action-suggester@v1
40+
with:
41+
tool_name: ruff
42+
yamllint:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: karancode/[email protected]

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
__pycache__/
22
.ruff_cache/
3+
.pytest_cache/
34
venv/

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ repos:
1212
- id: pretty-format-json
1313
exclude: ^.vscode/.*\.json$
1414
- id: trailing-whitespace
15+
- repo: local
16+
hooks:
17+
- id: just
18+
entry: just --fmt --unstable
19+
files: |
20+
(?x)^(
21+
.justfile|
22+
justfile
23+
)$
24+
language: system
25+
name: just
26+
pass_filenames: false
1527
- repo: https://github.com/jazzband/pip-tools
1628
rev: 7.4.0
1729
hooks:

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"ifdef",
2020
"ifndef",
2121
"inplace",
22+
"justfile",
2223
"microcontroller",
2324
"microcontrollers",
2425
"MOSI",

README.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ endif::[]
1717
:pre-commit: https://pre-commit.com/[pre-commit]
1818
:pipkin: https://github.com/aivarannamaa/pipkin[pipkin]
1919

20-
image:https://github.com/jwillikers/fan-controller/actions/workflows/ci.yml/badge.svg["CI", link="https://github.com/jwillikers/fan-controller/actions/workflows/ci.yml"]
2120
image:https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white[pre-commit, link=https://github.com/pre-commit/pre-commit]
2221
image:https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json[Ruff, link=https://github.com/astral-sh/ruff]
2322

0 commit comments

Comments
 (0)