Skip to content

Commit e214b91

Browse files
test workflow
1 parent d81e9a6 commit e214b91

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test
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.8", "3.9", "3.10", "3.11"]
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: Run tests with coverage
30+
run: |
31+
pytest --cov=cerebras_agent --cov-report=xml
32+
33+
- name: Upload coverage to Codecov
34+
uses: codecov/codecov-action@v3
35+
with:
36+
file: ./coverage.xml
37+
fail_ci_if_error: true

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ name = "cerebras-agent"
77
description = "A local agent for code development using Cerebras API"
88
readme = "README.md"
99
requires-python = ">=3.8"
10-
license = {text = "MIT"}
10+
license = {text = "Apache-2.0"}
1111
dynamic = ["version"]
1212
authors = [
1313
{name = "Cerebras", email = "[email protected]"}
1414
]
1515
classifiers = [
1616
"Development Status :: 3 - Alpha",
1717
"Intended Audience :: Developers",
18-
"License :: OSI Approved :: MIT License",
18+
"License :: OSI Approved :: Apache Software License",
1919
"Programming Language :: Python :: 3",
2020
"Programming Language :: Python :: 3.8",
2121
"Programming Language :: Python :: 3.9",

pytest.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[pytest]
2+
testpaths = tests
3+
python_files = test_*.py
4+
python_classes = Test*
5+
python_functions = test_*
6+
addopts = -v --tb=short
7+
markers =
8+
unit: Unit tests
9+
integration: Integration tests
10+
slow: Tests that take longer to run

0 commit comments

Comments
 (0)