Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Test Setup #104

Merged
merged 3 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
```
Loading