Skip to content

Commit 405f2b6

Browse files
committed
feat: add multi-version CI and update Python requirement to 3.10+
1 parent 1373c25 commit 405f2b6

File tree

4 files changed

+211
-3
lines changed

4 files changed

+211
-3
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
python-version: ["3.10", "3.11", "3.12", "3.13"]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v5
23+
with:
24+
version: "latest"
25+
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Install dependencies
32+
run: uv sync --all-extras --dev
33+
34+
- name: Run tests
35+
run: uv run pytest -v
36+
37+
lint:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- name: Install uv
43+
uses: astral-sh/setup-uv@v5
44+
with:
45+
version: "latest"
46+
47+
- name: Set up Python
48+
uses: actions/setup-python@v5
49+
with:
50+
python-version: "3.12"
51+
52+
- name: Install dependencies
53+
run: uv sync --all-extras --dev
54+
55+
- name: Run Ruff
56+
run: uv run ruff check src/

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [
66
]
77
description = "Pause your scripts automatically when gaming or running heavy apps."
88
readme = "README.md"
9-
requires-python = ">=3.12"
9+
requires-python = ">=3.10"
1010
license = "MIT"
1111
license-files = ["LICEN[CS]E*"]
1212
dependencies = [
@@ -17,6 +17,10 @@ dependencies = [
1717

1818
classifiers = [
1919
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
2024
"License :: OSI Approved :: MIT License",
2125
"Operating System :: OS Independent",
2226
]
@@ -38,6 +42,7 @@ dev = [
3842
"pytest-cov>=7.0.0",
3943
"ruff>=0.14.10",
4044
"taskipy>=1.2.1",
45+
"vermin>=1.8.0",
4146
]
4247

4348
[tool.ruff]

tests/test_basic.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""Basic tests for FortScript."""
2+
3+
from fortscript import FortScript
4+
5+
6+
def test_import():
7+
"""Test that FortScript can be imported."""
8+
assert FortScript is not None
9+
10+
11+
def test_instantiation_without_config():
12+
"""Test that FortScript raises error without valid config."""
13+
import pytest
14+
15+
with pytest.raises(FileNotFoundError):
16+
FortScript(config_path="nonexistent.yaml")

0 commit comments

Comments
 (0)