Skip to content

Awskube

Awskube #750

Workflow file for this run

name: pfb-clean Workflow
on:
push:
tags:
- 'v*'
pull_request:
jobs:
test:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version}}
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Upgrade pip and setuptools
run: python -m pip install -U pip setuptools
- name: Pin setuptools
run: python -m pip install setuptools==65.5
- name: Install pfb-clean
run: python -m pip install .[testing]
- name: Run tests
run: py.test -s -vvv tests/
deploy:
needs: [test]
runs-on: ubuntu-latest
# Run on a push to a tag or master
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install latest setuptools, wheel, pip
run: python3 -m pip install -U pip setuptools wheel
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Build distributions
run: python setup.py sdist bdist_wheel
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TEST_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
continue-on-error: false
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}