Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI #2

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
22 changes: 0 additions & 22 deletions .github/workflows/ci.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Lint
on: # yamllint disable-line rule:truthy
pull_request:
branches: ["main"]

permissions:
checks: write
contents: read
issues: write
pull-requests: write

jobs:
just:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v1
with:
just-version: "1.24.0"
- name: Format justfile
run: just --fmt --unstable
- uses: reviewdog/action-suggester@v1
with:
tool_name: just
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: chartboost/ruff-action@v1
with:
args: format
- uses: chartboost/ruff-action@v1
with:
args: check --fix
- uses: reviewdog/action-suggester@v1
with:
tool_name: ruff
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: karancode/yamllint-github-action@v2.1.1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__pycache__/
.ruff_cache/
.pytest_cache/
venv/
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ repos:
- id: pretty-format-json
exclude: ^.vscode/.*\.json$
- id: trailing-whitespace
- repo: local
hooks:
- id: just
entry: just --fmt --unstable
files: |
(?x)^(
.justfile|
justfile
)$
language: system
name: just
pass_filenames: false
- repo: https://github.com/jazzband/pip-tools
rev: 7.4.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"ifdef",
"ifndef",
"inplace",
"justfile",
"microcontroller",
"microcontrollers",
"MOSI",
Expand Down
1 change: 0 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ endif::[]
:pre-commit: https://pre-commit.com/[pre-commit]
:pipkin: https://github.com/aivarannamaa/pipkin[pipkin]

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"]
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]
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]

Expand Down
Loading