6
mirror of https://github.com/AllSpiceIO/cofactr-cogs.git synced 2025-04-18 07:48:55 +00:00

Add CI checks

This commit is contained in:
Jonathan Tran 2024-05-13 19:55:41 -04:00
parent 9f33593f70
commit 450170775f
No known key found for this signature in database
4 changed files with 47 additions and 0 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

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

@ -0,0 +1,33 @@
name: Test cofactr-cogs
on:
push:
branches: [main]
pull_request:
branches: ["**"]
jobs:
test:
name: Test cofactr-cogs
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@v4
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 .
- name: Check types
run: mypy .

3
requirements-test.txt Normal file
View File

@ -0,0 +1,3 @@
mypy==1.10.0
ruff==0.4.4
types-requests==2.31.0.20240406

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
requests==2.31.0