Skip to content

Merge pull request #60 from expel-io/update-python-version #107

Merge pull request #60 from expel-io/update-python-version

Merge pull request #60 from expel-io/update-python-version #107

Workflow file for this run

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 }}