Skip to content

Merge pull request #23 from nsalvacao/worker/lote2-aud007-command-sur… #68

Merge pull request #23 from nsalvacao/worker/lote2-aud007-command-sur…

Merge pull request #23 from nsalvacao/worker/lote2-aud007-command-sur… #68

Workflow file for this run

name: CI
on:
push:
branches: [main, "001-cli-plugins-base", "candidate/**"]
pull_request:
branches: [main, "candidate/**"]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Lint with ruff
run: ruff check src/ tests/
- name: Run tests
run: pytest tests/ -v --tb=short -x
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Ruff check
run: ruff check src/ tests/
- name: Ruff format check
run: ruff format --check src/ tests/
package-release-gates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build tools
run: python -m pip install --upgrade pip build
- name: Build sdist and wheel
env:
SOURCE_DATE_EPOCH: "1704067200"
run: python -m build --sdist --wheel --outdir dist
- name: Validate build artifacts
run: |
set -euo pipefail
shopt -s nullglob
sdists=(dist/*.tar.gz)
wheels=(dist/*.whl)
test "${#sdists[@]}" -eq 1
test "${#wheels[@]}" -eq 1
ls -lh dist
- name: Install built wheel and run smoke import checks
run: |
set -euo pipefail
python -m venv .venv-smoke
. .venv-smoke/bin/activate
python -m pip install --upgrade pip
python -m pip install --no-deps dist/*.whl
python -c "import crawler, generator, config, lib; print('artifact smoke import OK')"
cli-crawler --help >/dev/null
generate-plugin --help >/dev/null
config-audit --help >/dev/null