Skip to content

Commit a6d1e06

Browse files
committed
ci.yml and badges
1 parent d05fc78 commit a6d1e06

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: ['3.11', '3.12']
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v3
30+
with:
31+
version: "latest"
32+
33+
- name: Install dependencies
34+
run: |
35+
uv pip install --system -e ".[dev]"
36+
37+
- name: Run linting with ruff
38+
run: |
39+
ruff check piedomains/
40+
41+
- name: Run tests
42+
run: |
43+
pytest tests/ -v -m "not ml" --cov=piedomains --cov-report=xml
44+
45+
- name: Upload coverage to Codecov
46+
if: matrix.python-version == '3.11'
47+
uses: codecov/codecov-action@v4
48+
with:
49+
file: ./coverage.xml
50+
flags: unittests
51+
name: codecov-umbrella
52+
fail_ci_if_error: false

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# piedomains: AI-powered domain content classification
22

3-
[![Build Status](https://github.com/themains/piedomains/actions/workflows/python-publish.yml/badge.svg)](https://github.com/themains/piedomains/actions/workflows/python-publish.yml)
3+
[![CI](https://github.com/themains/piedomains/actions/workflows/ci.yml/badge.svg)](https://github.com/themains/piedomains/actions/workflows/ci.yml)
44
[![PyPI Version](https://img.shields.io/pypi/v/piedomains.svg)](https://pypi.python.org/pypi/piedomains)
5-
[![Documentation Status](https://readthedocs.org/projects/piedomains/badge/?version=latest)](http://piedomains.readthedocs.io/en/latest/?badge=latest)
5+
[![Documentation](https://github.com/themains/piedomains/actions/workflows/docs.yml/badge.svg)](https://github.com/themains/piedomains/actions/workflows/docs.yml)
66

77
**piedomains** predicts website content categories using AI analysis of domain names, text content, and homepage screenshots. Classify domains as news, shopping, adult content, education, etc. with high accuracy.
88

0 commit comments

Comments
 (0)