Merge pull request from AllSpiceIO/su/ci

Add linting and CI checks
This commit is contained in:
Shrikanth Upadhayaya 2024-05-16 16:04:15 -07:00 committed by GitHub
commit b12728b477
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 54 additions and 1 deletions

10
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: pip
directory: /
schedule:
interval: monthly
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly

31
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Lint and test
on:
push:
branches: [main]
pull_request:
branches: ["**"]
jobs:
test:
name: Test
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.10", "3.11", "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 -r requirements.txt
pip install -r requirements-test.txt
- name: Check formatting
run: ruff format --diff .
- name: Lint with ruff
run: ruff check --target-version=py310 .

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.venv

View File

@ -1,7 +1,8 @@
FROM python:3.12-bookworm
COPY requirements.txt /requirements.txt
COPY entrypoint.py /entrypoint.py
RUN pip install py-allspice~=3.0
RUN pip install -r /requirements.txt
ENTRYPOINT [ "/entrypoint.py" ]

8
pyproject.toml Normal file
View File

@ -0,0 +1,8 @@
[tool.ruff]
lint.ignore = [
"E501", # Line length.
"F405", # Unknown identifier usage due to import *.
]
line-length = 100
lint.select = ["E", "F", "RUF"]
exclude = []

1
requirements-test.txt Normal file
View File

@ -0,0 +1 @@
ruff==0.4.4

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
py-allspice==3.0.0