Skip to content

Commit

Permalink
Add ci.yaml github action. Add ruff cfg to pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
theferrit32 committed Nov 4, 2024
1 parent 270c833 commit 62b3fc6
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[dev]'
- name: Run lint + format
run: |
ruff check src
- name: Run tests
run: pytest
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,27 @@ source2classes = "ga4gh.gks.metaschema.scripts.source2classes:cli"
[build-system]
requires = ["setuptools>=65.3", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"


[tool.ruff]
line-length = 120
target-version = "py311"

[tool.ruff.lint]
# select = ["E4", "E7", "E9", "F"]
select = [
"C",
"F",
"I",
"E",
"W"
]
fixable = ["ALL"]

[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

0 comments on commit 62b3fc6

Please sign in to comment.