Skip to content

Commit d1e2b18

Browse files
committed
Add GitHub Actions CI workflow
1 parent 53f6084 commit d1e2b18

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
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+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.10", "3.11", "3.12"]
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install pytest pytest-cov
26+
pip install -r requirements.txt
27+
pip install -e .
28+
29+
- name: Run tests with coverage
30+
run: |
31+
python -m pytest tests/ --cov=src/feafea --cov-report=xml --cov-report=html --cov-report=term-missing
32+
33+
- name: Upload coverage reports to Codecov
34+
if: matrix.python-version == '3.10'
35+
uses: codecov/codecov-action@v3
36+
with:
37+
file: ./coverage.xml
38+
fail_ci_if_error: false
39+
40+
lint:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Set up Python
46+
uses: actions/setup-python@v4
47+
with:
48+
python-version: "3.10"
49+
50+
- name: Install dependencies
51+
run: |
52+
python -m pip install --upgrade pip
53+
pip install ruff
54+
55+
- name: Run Ruff
56+
run: ruff check .

0 commit comments

Comments
 (0)