Merge pull request #70 from lsst-sqre/tickets/DM-47580/cherrypick #371
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: Python CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # full depth for setuptools_scm | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Run tox | |
uses: lsst-sqre/run-tox@v1 | |
with: | |
python-version: ${{ matrix.python }} | |
tox-envs: "lint,typing,py" | |
env: | |
LTD_TEST_AWS_ID: ${{ vars.LTD_TEST_AWS_ID }} | |
LTD_TEST_AWS_SECRET: ${{ secrets.LTD_TEST_AWS_SECRET }} | |
LTD_TEST_BUCKET: ${{ vars.LTD_TEST_BUCKET }} | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # full depth for setuptools_scm | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- name: Run tox | |
uses: lsst-sqre/run-tox@v1 | |
with: | |
python-version: ${{ matrix.python }} | |
tox-envs: "docs" | |
- name: Install LTD Conveyor for upload | |
run: pip install . | |
- name: Upload to LSST the docs | |
if: ${{ github.event_name == 'push' }} | |
env: | |
LTD_USERNAME: ${{ secrets.LTD_USERNAME }} | |
LTD_PASSWORD: ${{ secrets.LTD_PASSWORD }} | |
run: ltd upload --product ltd-conveyor --gh --dir docs/_build/html | |
pypi: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
needs: [test, docs] | |
if: startsWith(github.ref, 'refs/tags/') | |
environment: | |
name: pypi | |
url: https://pypi.org/p/ltd-conveyor | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # full depth for setuptools_scm | |
- name: Build and publish | |
uses: lsst-sqre/build-and-publish-to-pypi@v2 | |
with: | |
python-version: "3.11" |