Skip to content

force beancount < 3 and enable tests also on pull_request #53

force beancount < 3 and enable tests also on pull_request

force beancount < 3 and enable tests also on pull_request #53

Workflow file for this run

name: ci
on:
push:
pull_request:
jobs:
test:
name: Run tests and build distribution
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
pip install tox wheel setuptools
- name: Run lint
run: >-
tox -e lint
- name: Run tests
run: >-
tox -e py
build-and-publish:
name: Build and optionally publish a distribution
runs-on: ubuntu-latest
needs: test # the test job must have been successful
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Dependencies
run: |
pip install wheel setuptools
- name: Build distribution
run: >-
make dist
- name: Publish distribution package to PyPI (on tags starting with v)
if: startsWith(github.event.ref, 'refs/tags/v')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
run: >-
pip install twine && twine upload dist/*