Skip to content

Commit 3f634e9

Browse files
committed
Add phylib CI
1 parent d9beeae commit 3f634e9

2 files changed

Lines changed: 83 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ci-${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
test:
19+
name: Test (${{ matrix.os }}, Python ${{ matrix.python-version }})
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
include:
25+
- os: ubuntu-latest
26+
python-version: "3.10"
27+
- os: ubuntu-latest
28+
python-version: "3.11"
29+
- os: ubuntu-latest
30+
python-version: "3.12"
31+
- os: macos-latest
32+
python-version: "3.12"
33+
- os: windows-latest
34+
python-version: "3.12"
35+
36+
steps:
37+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
38+
39+
- name: Set up Python ${{ matrix.python-version }}
40+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
41+
with:
42+
python-version: ${{ matrix.python-version }}
43+
cache: pip
44+
cache-dependency-path: |
45+
requirements.txt
46+
requirements-dev.txt
47+
48+
- name: Install dependencies
49+
run: |
50+
python -m pip install --upgrade pip
51+
python -m pip install -r requirements-dev.txt -e .
52+
53+
- name: Run tests
54+
run: python -m pytest phylib
55+
56+
build:
57+
name: Build package
58+
runs-on: ubuntu-latest
59+
needs: test
60+
61+
steps:
62+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
63+
64+
- name: Set up Python
65+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
66+
with:
67+
python-version: "3.12"
68+
cache: pip
69+
cache-dependency-path: requirements.txt
70+
71+
- name: Build package
72+
run: |
73+
python -m pip install --upgrade build
74+
python -m build
75+
76+
- name: Upload build artifacts
77+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
78+
with:
79+
name: dist
80+
path: dist/
81+
if-no-files-found: error

‎MANIFEST.in‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
include LICENSE
1+
include LICENSE.md
22
include README.md
3+
include requirements.txt
34

45
recursive-include tests *
56
recursive-include phylib/electrode/probes *.prb

0 commit comments

Comments
 (0)