Skip to content

CLI: refactoring

CLI: refactoring #45

Workflow file for this run

name: Checks
on:
push:
branches: [ main, "[0-9]+.[0-9]+" ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
services:
redis:
image: redis:7.4
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: python -m pip install "tox>=4.0"
- name: Run tests
run: tox -e tests,lint,type,precommit
test-coverage:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.14"]
services:
redis:
image: redis:7.4
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: python -m pip install "tox>=4.0"
- name: Run tests (coverage)
run: tox -e coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: crawlcore/qcrawl
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}