Merge pull request #19 from hvalev/emoji_update #15
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
tags: | |
- 'v*' | |
jobs: | |
test: | |
name: Test with different Python versions | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pipx | |
run: | | |
sudo apt update | |
sudo apt install pipx | |
pipx ensurepath | |
sudo pipx ensurepath --global | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Test with ruff | |
run: | | |
poetry run ruff check . | |
- name: Test with pytest | |
run: | | |
poetry run pytest . | |
build-and-publish: | |
name: Build and Publish | |
runs-on: ubuntu-22.04 | |
needs: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install pipx | |
run: | | |
sudo apt update | |
sudo apt install pipx | |
pipx ensurepath | |
sudo pipx ensurepath --global | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Build and publish to pypi | |
uses: JRubics/poetry-publish@v2.1 | |
with: | |
pypi_token: ${{ secrets.PYPI_PASSWORD }} | |
- name: Test with pytest and coverage | |
run: | | |
poetry run pytest --cov=./py_markdown_table/ --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
fail_ci_if_error: false |