Skip to content

move to pypi and zephyrscale cloud #424

move to pypi and zephyrscale cloud

move to pypi and zephyrscale cloud #424

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Run pre-commit
uses: pre-commit/[email protected]
test:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.11"
steps:
- name: Install pandoc
run: |
sudo apt-get -y install pandoc
- uses: actions/checkout@v3
- name: Run tox
uses: lsst-sqre/run-tox@v1
with:
python-version: ${{ matrix.python }}
tox-envs: "py,coverage-report,typing"
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/docs.txt
python -m pip install .
- name: Compile documentation
run: |
cd docs
make html
- name: Upload documentation
if: ${{ github.event_name == 'push' }}
env:
LTD_PASSWORD: ${{ secrets.LTD_PASSWORD }}
LTD_USERNAME: ${{ secrets.LTD_USERNAME }}
run: |
ltd upload --product docsteady --gh --dir docs/_build/html
pypi:
runs-on: ubuntu-latest
needs: [lint, test]
if: startsWith(github.ref, 'refs/tags/')
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
# Need to clone everything to embed the version.
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel build
- name: Build and create distribution
run: |
python -m build --skip-dependency-check
- name: Upload
uses: pypa/gh-action-pypi-publish@release/v1