Skip to content

Bump version: 9.0.1 → 9.0.2 #312

Bump version: 9.0.1 → 9.0.2

Bump version: 9.0.1 → 9.0.2 #312

Workflow file for this run

name: build
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, windows-latest, macos-latest]
tox_env: [py]
include:
- python: '3.10'
os: ubuntu-latest
tox_env: 'lint'
- python: '3.10'
os: ubuntu-latest
tox_env: 'update-readme'
- python: '3.10'
os: ubuntu-latest
tox_env: 'build'
steps:
- name: Set git to not change EoL
if: runner.os == 'Windows'
run: |
git config --global core.autocrlf false
- name: Cache pre-commit packages
id: cache-pre-commit
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-py${{ matrix.python }}-pre-commit
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: 'x64'
cache: 'pip'
- name: install dependencies
run: |
python -mpip install --progress-bar=off -r test-requirements.txt
pip --version
pip list --format=freeze
- name: Test
run: tox -e ${{ matrix.tox_env }} -v
# TODO: Publish package only for signed tags
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && contains(matrix.tox_env, 'build')
run: |
ls -lah dist/*
python -m twine upload --verbose -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --repository-url https://upload.pypi.org/legacy/ dist/*
#TODO: Add GITHUB_RUN_ID.GITHUB_RUN_ATTEMPT.GITHUB_RUN_NUMBER to bumpversion to avoid duplicating upload versions or even the git sha
- name: codecov
if: startsWith(matrix.tox_env, 'py') # only coveralls in python tests
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false # TODO: Set true after fix token for win&macosx
verbose: true