Skip to content

Commit a9e6368

Browse files
committed
feat(ci): added GitHub Actions for linting and tests run
1 parent a35f983 commit a9e6368

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: [ "**" ]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: tests-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v6.0.2
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v6.2.0
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
allow-prereleases: true
31+
32+
- name: Set up uv
33+
uses: astral-sh/setup-uv@v5
34+
with:
35+
enable-cache: true
36+
37+
- name: Install dependencies
38+
run: uv sync --all-extras --dev
39+
40+
- name: Run tests
41+
run: uv run pytest --cov=codeclone --cov-report=term-missing --cov-fail-under=98
42+
43+
lint:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v6.0.2
48+
49+
- name: Set up Python
50+
uses: actions/setup-python@v6.2.0
51+
with:
52+
python-version: "3.13"
53+
54+
- name: Set up uv
55+
uses: astral-sh/setup-uv@v5
56+
with:
57+
enable-cache: true
58+
59+
- name: Install dependencies
60+
run: uv sync --all-extras --dev
61+
62+
- name: Ruff
63+
run: uv run ruff check .
64+
65+
- name: Mypy
66+
run: uv run mypy .

0 commit comments

Comments
 (0)