bugfix time unit #803
This file contains 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: CI-CD | |
on: [push] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install libncurses for roadrunner | |
run: sudo apt-get install -y libncurses5 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install tox tox-gh-actions | |
- name: Test with tox | |
run: | |
tox -- --cov-report=xml | |
release: | |
needs: test | |
if: startsWith(github.ref, 'refs/tags') | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.12"] | |
environment: | |
name: pypi | |
url: https://pypi.org/p/<your-pypi-project-name> | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get tag | |
id: tag | |
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install twine | |
- name: Build package | |
run: python setup.py sdist bdist_wheel | |
- name: Check the package | |
run: twine check dist/* | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: dist | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: "release-notes/${{ github.ref_name }}.md" | |
draft: false | |
prerelease: false |