Skip to content

Merge pull request #7 from nyaruka/update-poetry #18

Merge pull request #7 from nyaruka/update-poetry

Merge pull request #7 from nyaruka/update-poetry #18

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
name: Test
strategy:
matrix:
python-version: ['3.10.x', '3.11.x', '3.12.x', '3.13.x']
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Initialize environment
run: |
python -m pip install -U pip poetry
poetry install
- name: Run tests
run: |
poetry run flake8
poetry run py.test --cov-report=xml --cov=xlsxlite xlsxlite
- name: Upload coverage
if: success()
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
release:
name: Release
needs: [ test ]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.12.x'
- name: Publish release
run: |
python -m pip install -U pip poetry
poetry build
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish