Merge pull request #36 from kevinconway/multi-path-references #33
Workflow file for this run
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 | |
on: | |
push: | |
branches: | |
- "master" | |
tags: ["*"] | |
pull_request: | |
branches: | |
- "master" | |
workflow_dispatch: {} | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Cache PyPI | |
uses: actions/cache@v2 | |
with: | |
key: pip-lint-${{ hashFiles('requirements.txt', 'test-requirements.txt') }} | |
path: ~/.cache/pip | |
restore-keys: | | |
pip-lint- | |
- name: Install dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
python -m pip install -r test-requirements.txt | |
- name: pep8 | |
run: | | |
pycodestyle --max-line-length=120 venvctrl/ | |
pycodestyle --max-line-length=120 tests/ | |
- name: pyflakes | |
run: | | |
pyflakes venvctrl/ | |
pyflakes tests/ | |
test: | |
name: Test | |
needs: lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
pyver: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
fail-fast: true | |
steps: | |
- name: Install deps | |
run: sudo apt-get update && sudo apt-get install -y enchant-2 | |
- name: Checkout | |
uses: actions/checkout@v2.4.0 | |
- name: Setup Python ${{ matrix.pyver }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.pyver }} | |
- name: Cache PyPI | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.pyver }}-${{ hashFiles('test-requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ matrix.pyver }}- | |
- name: Install dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
python -m pip install -r test-requirements.txt | |
python -m pip install -e ./ | |
- name: Run tests | |
env: | |
PYTHONPATH: . | |
run: py.test tests/ | |
build-and-publish: | |
name: Build and publish | |
needs: test | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install pypa/build | |
run: python -m pip install build | |
- name: Build a binary wheel and a source tarball | |
run: python -m build --sdist --wheel --outdir dist/ . | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |