Skip to content

Better checks for Changelog entries #477

Better checks for Changelog entries

Better checks for Changelog entries #477

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
# check package is importable
python -c "import pkgmt"
python -c "import pkgmt.cli"
pip install ".[dev]"
- name: Lint with flake8
run: |
flake8
- name: Test with pytest
run: |
pytest
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install 'pkgmt[check]'
- name: Check project
run: |
pkgmt check
release:
needs: [unit-tests, check]
if: startsWith(github.ref, 'refs/tags') && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install pkgmt twine wheel --upgrade
- name: Upload
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
echo "tag is $TAG"
pkgmt release $TAG --production --yes