Skip to content

Commit

Permalink
ci: add style & lint workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxvanyang committed Jun 6, 2024
1 parent 05732c3 commit 9cbca8c
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint

on: [push]

jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint flake8
- name: Analyze using Pylint
run: pylint src tests
- name: Analyze using Flake8
run: flake8 src tests
ruff:
runs-on: ubuntu-latest
steps:
- name: Analyze using Ruff
uses: chartboost/ruff-action@v1
21 changes: 21 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Style Check

on: [push]

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install isort black
- name: Check using isort
run: isort --check src tests
- name: Check using black
run: black --check src tests
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# batchlink

[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm-project.org)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Flake8: checked](https://img.shields.io/badge/flake8-checked-blueviolet)](https://flake8.pycqa.org)

Batch link files without modifying original files.

0 comments on commit 9cbca8c

Please sign in to comment.