-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (96 loc) · 3.11 KB
/
Copy pathci.yml
File metadata and controls
117 lines (96 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: Python ${{ matrix.python-version }} / Ubuntu
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install project
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Run tests
run: pytest
quality:
name: Lint and package checks
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install development tools
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Run Ruff
run: ruff check .
- name: Validate PyPI README rendering
run: python -m readme_renderer README.md -o /tmp/explain-codebase-readme.html
- name: Build distributions
run: python -m build
- name: Check distributions
run: python -m twine check --strict dist/*
- name: Install wheel in a clean environment
run: |
python -m venv .venv-smoke
.venv-smoke/bin/python -m pip install --upgrade pip
.venv-smoke/bin/python -m pip install dist/*.whl
- name: Smoke-test installed command
run: |
.venv-smoke/bin/explain-codebase --help
.venv-smoke/bin/explain-codebase --version
.venv-smoke/bin/explain-codebase fixtures/python_cli_example --json
windows-smoke:
name: Windows smoke test
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install project
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Run tests
run: pytest
- name: Smoke-test command
run: |
explain-codebase --help
explain-codebase --version
explain-codebase fixtures/python_cli_example --json