Skip to content

Commit

Permalink
[CI] Add tests and linter checking (#131)
Browse files Browse the repository at this point in the history
* Add tests and port setup.py to pyproject.toml

* Format with ruff

* Remove warning

* Configure ruff formatting

* Create pytest.yaml

* Add tests

commit 5e0857a
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 21:31:46 2024 +0200

    Create pytest.yaml

commit a656350
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 20:58:26 2024 +0200

    Configure ruff formatting

commit 0749af9
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 20:58:18 2024 +0200

    Remove warning

commit 2af9fa5
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 20:47:00 2024 +0200

    Format with ruff

commit 98d0f6a
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 20:40:27 2024 +0200

    Add tests and port setup.py to pyproject.toml

* Temporary rename

* Rename back to lowecase workflows

* Fix add tests

commit 3fa7f6e
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 21:35:05 2024 +0200

    Rename back to lowecase workflows

commit 9ab922d
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 21:34:44 2024 +0200

    Temporary rename

commit 5e0857a
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 21:31:46 2024 +0200

    Create pytest.yaml

commit a656350
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 20:58:26 2024 +0200

    Configure ruff formatting

commit 0749af9
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 20:58:18 2024 +0200

    Remove warning

commit 2af9fa5
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 20:47:00 2024 +0200

    Format with ruff

commit 98d0f6a
Author: echedey-ls <[email protected]>
Date:   Sat Aug 3 20:40:27 2024 +0200

    Add tests and port setup.py to pyproject.toml

* Delete pytest.yaml

* Update pytest.yaml

* Remove non-working Python vers and set minimum Py ver

* leave ruff for a future problem

* ruff linting
  • Loading branch information
echedey-ls authored Jan 13, 2025
1 parent 348c56b commit 6cc29a3
Show file tree
Hide file tree
Showing 11 changed files with 336 additions and 145 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Pytest

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

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.x"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
sudo apt update
sudo apt install dvipng texlive-latex-extra texlive-fonts-recommended cm-super
sudo apt install fonts-noto-cjk
- name: Test with pytest
run: |
pytest
26 changes: 26 additions & 0 deletions .github/workflows/ruff_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Ruff Check

on:
push:
pull_request:

jobs:
ruff-lint:
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff
run: ruff check --output-format=github .
7 changes: 6 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
global-include *.mplstyle
prune .github
prune .git
prune examples

exclude .gitignore
exclude CHANGES.md
Loading

0 comments on commit 6cc29a3

Please sign in to comment.