Merge pull request #62 from expel-io/ad-hoc/add-readthedocs-yaml #114
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: pyexclient ci/cd | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: | |
- "*.*.*" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: sanity check | |
run: "! grep -q judy $GITHUB_WORKSPACE/pyexclient/workbench.py" | |
- name: failed sanity check | |
if: ${{ failure() }} | |
run: exit 1 | |
- name: run linter | |
uses: github/super-linter@v4 | |
env: | |
VALIDATE_PYTHON_FLAKE8: true | |
PYTHON_FLAKE8_CONFIG_FILE: .flake8 | |
FILTER_REGEX_EXCLUDE: (/docs/|/examples/|versioneer\.py) | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
test: | |
needs: | |
- lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: install dependencies | |
run: | | |
python -m pip install pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: run tests | |
run: pytest -vx | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: install dependencies | |
run: | | |
python -m pip install --upgrade setuptools wheel | |
- name: build wheels | |
run: python setup.py bdist_wheel | |
- name: publish to pypi | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.pypi_password }} |