Skip to content

Commit

Permalink
merge tests (#28)
Browse files Browse the repository at this point in the history
* merge tests

* Update README.md
  • Loading branch information
pawngrubber authored Nov 5, 2022
1 parent c9d5062 commit ff7d41e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 43 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/pre-commit.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run python unit tests

name: unittests
name: tests

on:
push:
Expand Down Expand Up @@ -37,5 +37,8 @@ jobs:
cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.REPO_NAME }}:cache,mode=max
outputs: type=docker
-
name: Run tests
name: Unit tests
run: docker run ${{ secrets.REPO_NAME }}:gha pytest
-
name: Style tests
run: docker run ${{ secrets.REPO_NAME }}:gha pre-commit run --all-files
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,28 @@ Code development is in a Docker image, use these steps to spin up the image
exit
```
## Updating the Environment
## Develop without Docker
1. Create a Python virtual environment
```
python3 -m venv <environment-name>
```
2. In this virtual environment, install necessary requirements files
```
python -m pip install -r requirements/dev.txt
python -m pip install -r requirements/prod.txt
```
3. Build and install
```
python -m build
python -m pip install -e . --no-deps
```
4. Test things
```
pre-commit run --all-files
pytest
```
## Updating requirements folder
1. Use pip-compile to build a new pinned requirements file.
```
pip-compile requirements/prod.in --output-file=requirements/prod.txt
Expand Down

0 comments on commit ff7d41e

Please sign in to comment.