-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.43 KB
/
ci.yml
File metadata and controls
49 lines (47 loc) · 1.43 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
name: CI
on:
pull_request:
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install Dev Dependencies
run: python -m pip install -e ".[dev]"
- name: Ruff
run: python -m ruff check .
- name: Pytest
run: python -m pytest -p pytest_cov -q -p no:cacheprovider --cov=toolkit --cov-report=term-missing --cov-report=xml --cov-fail-under=70
- name: Upload Coverage Artifact
if: always() && hashFiles('coverage.xml') != ''
uses: actions/upload-artifact@v7
with:
name: coverage-py${{ matrix.python-version }}
path: coverage.xml
- name: Install And CLI Smoke
if: ${{ hashFiles('scripts/smoke_install_cli.py') != '' }}
run: python scripts/smoke_install_cli.py
build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install Build Tooling
run: python -m pip install build twine
- name: Build Distributions
run: python -m build
- name: Twine Check
run: python -m twine check dist/*