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 new gitlab action #3

Merged
merged 2 commits into from
Dec 4, 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
37 changes: 37 additions & 0 deletions .github/workflows/python-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Python tests

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: macos-14
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pipx install poetry
- name: Install dependencies
run: |
brew install cairo
poetry env use python${{ matrix.python-version }}
poetry install
- name: Lint with flake8
run: |
poetry run flake8
- name: Lint with black
run: poetry run black --check .
- name: Test with pytest
run: |
poetry run pytest
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ The project includes unit tests to ensure the functionality of various component
pytest
```

Note that if you have a different cairo version installed some tests might fail. This is due to the fact that the tests compare the rendered images with reference images. If you have a different cairo version installed, the images might look slightly different.


## Output Example

The image below is an example of a map created using the Mapsy library:
Expand Down
1 change: 0 additions & 1 deletion mapsy/icon/icon.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from dataclasses import dataclass
import os
from pathlib import Path

from mapsy.common import IconAlign
Expand Down
1 change: 0 additions & 1 deletion test/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
import mapsy
from contextlib import contextmanager
from os import path
Expand Down
Loading