Skip to content

Commit 9dcb7d7

Browse files
authored
Create ci.yml
1 parent 7ddf25c commit 9dcb7d7

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e ".[dev]"
28+
29+
- name: Lint with ruff
30+
run: ruff check .
31+
32+
- name: Run tests with coverage
33+
run: |
34+
pytest tests/ -v --cov=amrl_transport --cov-report=xml --cov-report=term-missing
35+
36+
- name: Upload coverage to Codecov
37+
if: matrix.python-version == '3.12'
38+
uses: codecov/codecov-action@v4
39+
with:
40+
files: coverage.xml
41+
fail_ci_if_error: false
42+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)