Skip to content

Commit

Permalink
fix: remove unnecessary build inclusion; add build test (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlstadther authored Aug 24, 2024
1 parent 1bf44a0 commit 07118ac
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,24 @@ jobs:
- name: Test with pytest
run: make test

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
make init-uv
make install
- name: Verify build
run: make build

# nox:
# runs-on: ubuntu-latest
# strategy:
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
TEST_DIR="tests"

# Build
build:
uvx --from build pyproject-build --installer uv

# Docs
doc-build:
uv run mkdocs build
Expand Down
16 changes: 10 additions & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ def _install_package_manager(session: nox.Session) -> nox.Session:
@nox.session
def tests(session: nox.Session) -> None:
session = _install_package_manager(session=session)
session.run("coverage", "run", "-m", "pytest", "-vv")
session.run("coverage", "report")
session.run("make", "test")


@nox.session
def lint(session: nox.Session) -> None:
session = _install_package_manager(session=session)
session.run("ruff", "format", "--check", ".")
session.run("ruff", "check", "--output-format=github", ".")
session.run("sqlfluff", "lint", ".")
session.run("make", "format")
session.run("make", "lint")


@nox.session
def typing(session: nox.Session) -> None:
session = _install_package_manager(session=session)
session.run("mypy", ".")
session.run("make", "type")


@nox.session
def build(session: nox.Session) -> None:
session = _install_package_manager(session=session)
session.run("make", "build")
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ dev-dependencies = [

[tool.hatch.build]
packages = ["src/sample"]
include = [
"sample/sql/*",
]


##########
Expand Down

0 comments on commit 07118ac

Please sign in to comment.