Skip to content

Commit

Permalink
ci: copy Lint & Test workflow from mainframe repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sid-maddy committed Oct 19, 2024
1 parent 23ea50f commit 194ae46
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 71 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Lint & Test

on:
push:
branches:
- main
tags:
- v*
pull_request:

defaults:
run:
shell: bash

jobs:
lint_test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Setup PDM
uses: pdm-project/setup-pdm@568ddd69406b30de1774ec0044b73ae06e716aa4 # v4
with:
python-version: '3.12'
cache: true

- name: Install dependencies
run: pdm install --no-self

- name: Run pre-commit
run: pdm pre-commit

- name: Run tests
run: pdm test
45 changes: 0 additions & 45 deletions .github/workflows/python-ci.yaml

This file was deleted.

16 changes: 8 additions & 8 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 25 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ version = "5.0.0"
requires-python = ">=3.11,<3.12.dev0"
license = {text = "MIT"}
dependencies = [
# Core
"discord-py==2.3.2",
"pydis-core==10.7.0",
"aiohttp==3.10.9",
"pydantic==2.6.0",
"pydantic-settings==2.2.1",
# Logging
"sentry-sdk==2.15.0",
"rapidfuzz==3.6.1",
"coloredlogs==15.0.1",
# Database
"psycopg[binary]==3.1.18",
"SQLAlchemy==2.0.27",
# Extensions
## exts/utilities/internal
"arrow==1.3.0",
# Core
"discord-py==2.3.2",
"pydis-core==10.7.0",
"aiohttp==3.10.9",
"pydantic==2.6.0",
"pydantic-settings==2.2.1",
# Logging
"sentry-sdk==2.15.0",
"rapidfuzz==3.6.1",
"coloredlogs==15.0.1",
# Database
"psycopg[binary]==3.1.18",
"SQLAlchemy==2.0.27",
# Extensions
## exts/utilities/internal
"arrow==1.3.0",
]

[project.optional-dependencies]
pre-commit = ["pre-commit==3.6.2"]
pyright = ["pyright==1.1.383"]
pyright = ["pyright==1.1.385"]
ruff = ["ruff==0.3.4"]

docs = ["sphinx==7.2.6", "furo==2024.1.29", "sphinx-autoapi==3.0.0", "releases==2.1.1"]
tests = ["pytest==8.1.1", "pytest-randomly==3.15.0"]
tests = ["pytest==8.3.3", "pytest-randomly==3.15.0"]

[project.urls]
repository = "https://github.com/vipyrsec/bot/"
Expand All @@ -42,9 +42,16 @@ build-backend = "pdm.backend"
format = "ruff format"
lint = "ruff check --fix"
type-check = "pyright"
pre-commit = "pre-commit run --all-files"
test = "pytest"
all = {composite = ["format", "lint", "type-check", "test"]}

[tool.pyright]
include = ["src/**/*.py"]

venvPath = "."
venv = ".venv"

[tool.ruff]
preview = false
unsafe-fixes = true
Expand Down

0 comments on commit 194ae46

Please sign in to comment.