Skip to content

Commit

Permalink
Merge pull request #7 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 af613c1 + 01ddbcf commit f37485c
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 16 deletions.
File renamed without changes.
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python application
name: Test

on: # yamllint disable-line rule:truthy
pull_request:
Expand All @@ -8,20 +8,6 @@ permissions:
contents: read

jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: karancode/yamllint-github-action@v2.1.1
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
test:
runs-on: ubuntu-latest
steps:
Expand Down
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 @@ -25,6 +25,7 @@
"Imager",
"Immich",
"inplace",
"justfile",
"jwillikers",
"keyrings",
"kmsprint",
Expand Down
3 changes: 2 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ endif::[]
:Rclone: https://rclone.org/[Rclone]
:systemd: https://systemd.io/[systemd]

image:https://github.com/jwillikers/detectionator/actions/workflows/python-app.yaml/badge.svg[CI, link=https://github.com/jwillikers/detectionator/actions/workflows/python-app.yaml]
image:https://github.com/jwillikers/detectionator/actions/workflows/test.yaml/badge.svg[Tests, link=https://github.com/jwillikers/detectionator/actions/workflows/test.yaml]
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]

A Raspberry Pi camera for taking pictures using object detection.
Expand Down

0 comments on commit f37485c

Please sign in to comment.