Skip to content

Commit

Permalink
New Test Setup (#104)
Browse files Browse the repository at this point in the history
* Restructure testing
  • Loading branch information
seanpmorgan authored Jan 21, 2024
1 parent 06af673 commit f6d2296
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 38 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ on:
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./python-sdk
if: contains(github.event.pull_request.labels.*.name, 'okay-to-test') || (github.event_name == 'push')

steps:
Expand All @@ -33,18 +30,8 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-dev-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
make install-dev
- name: Install server dependencies
# The python tests spin up a server instance if it's not already running.
# Spin up a server instance for testing against
run: |
make init-server
- name: Run tests
Expand Down
18 changes: 2 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
.PHONY: test lint format

test:
cd python-sdk; pytest tests/

lint:
cd python-sdk; black rebuff/ tests/
cd python-sdk; flake8 rebuff/ tests/
cd python-sdk; isort rebuff/ tests/
cd python-sdk; mypy rebuff/ tests/

format:
cd python-sdk; isort rebuff/ tests/
cd python-sdk; black rebuff/ tests/
cd python-sdk; make install-dev; make test

init-python-sdk:
cd python-sdk; make install-dev
Expand All @@ -22,8 +12,4 @@ init-js-sdk:
cd javascript-sdk; npm install

init-server:
cd server; npm install

publish-python-sdk:
cd python-sdk; python-sdk setup.py sdist bdist_wheel
cd python-sdk; twine upload dist/*
cd server; npm install
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,3 @@ To set up the development environment, run:
```bash
make init
```

To run tests, linting, and formatting, use the following commands:

```bash
make test
make lint
make format
```

0 comments on commit f6d2296

Please sign in to comment.