Skip to content

Commit e9dddfe

Browse files
committed
add CI
1 parent 961b1bb commit e9dddfe

File tree

5 files changed

+142
-2
lines changed

5 files changed

+142
-2
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
groups:
9+
actions:
10+
patterns:
11+
- "*"

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
env:
15+
# Many color libraries just need this to be set to any value, but at least
16+
# one distinguishes color depth, where "3" -> "256-bit color".
17+
FORCE_COLOR: 3
18+
19+
jobs:
20+
tests:
21+
name: Tests
22+
runs-on: ${{ matrix.runs-on }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
runs-on: [ubuntu-latest]
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
33+
- uses: prefix-dev/[email protected]
34+
with:
35+
pixi-version: v0.39.4
36+
cache: true
37+
environments: [dev]
38+
39+
- name: Test package
40+
run: pixi run tests

pixi.lock

Lines changed: 81 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: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ ipython = ">=8.31.0,<9"
3333
[tool.pixi.feature.dev.tasks]
3434
ipython = "ipython"
3535

36+
[tool.pixi.feature.tests.dependencies]
37+
pytest = "*"
38+
39+
[tool.pixi.feature.tests.tasks]
40+
tests = "pytest"
41+
3642
[tool.pixi.environments]
3743
default = { solve-group = "default" }
38-
dev = { features = ["dev"], solve-group = "default" }
44+
dev = { features = ["dev", "tests"], solve-group = "default" }

tests/test_pint_array.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class TestImport():
2+
def test_import(self):
3+
import pint_array

0 commit comments

Comments
 (0)