Skip to content

tests fixed

tests fixed #13

Workflow file for this run

# .github/workflows/ci.yml
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# 1. Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# 2. Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10' # Specify your Python version
# 3. Install Poetry
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: '1.8.3' # Specify your Poetry version
# 4. Cache Poetry dependencies (Optional but recommended)
- name: Cache Poetry dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pypoetry
~/.cache/pip
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
# 5. Install dependencies
- name: Install dependencies
run: poetry install --no-interaction --no-ansi
# 6. Run tests
- name: Run tests
run: poetry run pytest -v
# 7. Build the package
- name: Build package
run: poetry build
# 8. Publish to PyPI
- name: Publish to PyPI
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }} -vvv