Skip to content

Support "Inactive Ballots" #180

Support "Inactive Ballots"

Support "Inactive Ballots" #180

Workflow file for this run

name: Run tests
on: push
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
pip install -r requirements.txt
- name: Unit tests with nose
run: |
nosetests
- name: CLI tests
run: |
pip install .
./scripts/testcli.sh
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-test.txt
pip install -r requirements.txt
- name: Lint with pylint
run: |
./scripts/lint.sh
build-wheel:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install twine wheel
- name: Validate wheel can be built
run: |
./scripts/validate_wheel.sh
make-docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install sphinx recommonmark
python -m pip install -r docs/source/requirements.txt
- name: Make docs
run: |
cd docs && make html
tag-and-release:
if: github.ref == 'refs/heads/main'
needs:
- test
- lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel
pip install -r requirements.txt
- name: Bump version and push tag
uses: anothrNick/[email protected]
id: tag_version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
INITIAL_VERSION: 0.0.1
RELEASE_BRANCHES: main
- name: Build a binary wheel and a source tarball
env:
TAG_FROM_GITHUB_ACTIONS: ${{ steps.tag_version.outputs.new_tag }}
run: >-
python3 setup.py sdist bdist_wheel
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create Github Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.new_tag }}
draft: false
prerelease: false