From e5c8d5a027f9842f1a3b37508c6ae5c117289e91 Mon Sep 17 00:00:00 2001 From: elijahbenizzy Date: Tue, 6 Feb 2024 11:07:48 -0800 Subject: [PATCH] Sets up github actions This has two jobs -- pre-commit + tests. Tests run for 3.9, 3.10, 3.11, 3.12. --- .github/workflows/python-package.yml | 21 +++++++++++---------- pyproject.toml | 6 ++++++ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b4bd522c0..83b5918f5 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -3,15 +3,16 @@ name: Build Burr -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] +on: [push, pull_request] jobs: - build: - + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3.0.0 + test: runs-on: ubuntu-latest strategy: fail-fast: false @@ -26,7 +27,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install -e . - - name: Run test + python -m pip install -e ".[tests]" + - name: Run tests run: | - python test.py + python -m pytest tests diff --git a/pyproject.toml b/pyproject.toml index 17b0c8871..8a3b12ad8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,11 +31,17 @@ streamlit = [ "streamlit" ] +tests = [ + "pytest", + "pytest-asyncio", +] + [tool.poetry.packages] include = [ { include = "burr", from = "." }, ] + [project.urls] Homepage = "https://github.com/dagworks-inc/burr" Documentation = "https://github.com/dagworks-inc/burr"