Skip to content

Commit

Permalink
Merge pull request #2 from jwillikers/ci
Browse files Browse the repository at this point in the history
Improve CI
  • Loading branch information
jwillikers authored Feb 27, 2024
2 parents 9065226 + f4ee8fa commit 1e7d3cb
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 23 deletions.
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/[email protected]
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 @@ -17,6 +17,7 @@
"ifdef",
"ifndef",
"inplace",
"justfile",
"ladyada",
"microcontroller",
"microcontrollers",
Expand Down
1 change: 0 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ endif::[]
:pre-commit: https://pre-commit.com/[pre-commit]
:Python: https://www.python.org/[Python]

image:https://github.com/jwillikers/humidity-sensor-circuitpython/workflows/CI/badge.svg["Build Status", link="https://github.com/jwillikers/humidity-sensor-circuitpython/actions?query=workflow%3ACI"]
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

0 comments on commit 1e7d3cb

Please sign in to comment.