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

add basic pytest-mpl test and CI setup #13

Closed
Closed
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
29 changes: 29 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: poetry install

- name: Run tests with the mpl plugin
run: pytest --mpl
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ parser.parseAndGenerateImage(script_string) # The script is passed as a string t
parser.save(image_location, image_name) # Saves the image with the name 'image_name' in the folder specified by 'image_location'.
```

## Testing

The tests are using [pytest-mpl](https://github.com/matplotlib/pytest-mpl) to check if the examples remain the same (image comparison with some tolerance).
The tests are run with github actions but you can also run it manually:

```shell
pytest --mpl
```

## Web Setup (To be updated)

To set up Pigeon with Flask, follow these steps:
Expand Down
Loading