Skip to content

Commit 7da03e4

Browse files
committed
CI pipeline
1 parent d79b9f3 commit 7da03e4

File tree

3 files changed

+178
-1
lines changed

3 files changed

+178
-1
lines changed

.github/workflows/build.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: opencosmo CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
lint-typecheck:
10+
name: Lint and Type Check
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.11'
21+
22+
- name: Install Poetry
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install poetry
26+
27+
- name: Install dependencies
28+
run: poetry install --with develop
29+
30+
- name: Run ruff linter
31+
run: poetry run ruff check .
32+
33+
- name: Run mypy type checker
34+
run: poetry run mypy .
35+
36+
test:
37+
name: Test
38+
runs-on: ${{ matrix.os }}
39+
strategy:
40+
matrix:
41+
os: [ubuntu-latest, macos-latest, windows-latest]
42+
python-version: ['3.11', '3.12', '3.13']
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
48+
- name: Set up Python
49+
uses: actions/setup-python@v4
50+
with:
51+
python-version: ${{ matrix.python-version }}
52+
53+
- name: Install Poetry
54+
- uses: snok/install-poetry@v1
55+
56+
- name: Install dependencies
57+
run: poetry install --with test
58+
59+
- name: Run tests with pytest
60+
run: poetry run pytest

poetry.lock

Lines changed: 108 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,20 @@ readme = "README.md"
99
python = "^3.11"
1010
h5py = "^3.12.1"
1111

12+
[tool.poetry.group.test]
13+
optional = true
1214

1315
[tool.poetry.group.test.dependencies]
1416
pytest = "^8.3.4"
1517

18+
19+
[tool.poetry.group.develop.dependencies]
20+
ruff = "^0.9.4"
21+
mypy = "^1.14.1"
22+
23+
[tool.poetry.group.develop]
24+
optional = true
25+
1626
[build-system]
1727
requires = ["poetry-core"]
1828
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)