Skip to content

Commit 6cc29a3

Browse files
authored
[CI] Add tests and linter checking (#131)
* 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
1 parent 348c56b commit 6cc29a3

File tree

11 files changed

+336
-145
lines changed

11 files changed

+336
-145
lines changed

.github/workflows/pytest.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Pytest
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.x"]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install .[test]
27+
sudo apt update
28+
sudo apt install dvipng texlive-latex-extra texlive-fonts-recommended cm-super
29+
sudo apt install fonts-noto-cjk
30+
- name: Test with pytest
31+
run: |
32+
pytest

.github/workflows/ruff_check.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Ruff Check
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
ruff-lint:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.x'
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install ruff
24+
25+
- name: Run Ruff
26+
run: ruff check --output-format=github .

MANIFEST.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
global-include *.mplstyle
1+
prune .github
2+
prune .git
3+
prune examples
4+
5+
exclude .gitignore
6+
exclude CHANGES.md

0 commit comments

Comments
 (0)