fix: correct CI workflow configuration
Some checks failed
CI / test (push) Failing after 14s
CI / build (push) Has been skipped

This commit is contained in:
2026-02-02 20:22:25 +00:00
parent 3605b547da
commit 2a6c0786df

View File

@@ -2,24 +2,20 @@ name: CI
on: on:
push: push:
branches: [main, master] branches: [main]
pull_request: pull_request:
branches: [main, master] branches: [main]
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python-version }} python-version: '3.11'
- name: Install dependencies - name: Install dependencies
run: | run: |
@@ -27,51 +23,33 @@ jobs:
pip install -e ".[dev]" pip install -e ".[dev]"
- name: Run tests - name: Run tests
run: | run: pytest tests/ -v
python -m pytest tests/ -v --tb=short
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: |
python -m pip install --upgrade pip
pip install ruff
pip install -e .
- name: Run linter - name: Run linter
run: | run: ruff check regex_humanizer/ tests/
ruff check src/ tests/
- name: Run type check
run: mypy regex_humanizer/
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: test
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.12" python-version: '3.11'
- name: Install build dependencies - name: Install build dependencies
run: | run: pip install build
python -m pip install --upgrade pip
pip install build
- name: Build package - name: Build package
run: | run: python -m build
python -m build
- name: Verify installation - name: Upload artifact
run: | uses: actions/upload-artifact@v4
pip install dist/openapi_mock_generator-0.1.0-py3-none-any.whl with:
python -c "import src; from src.__main__ import main; print('Package imported successfully')" name: dist
path: dist/