-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (71 loc) · 2.04 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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: ${{ secrets.LTD_TEST_AWS_ID }}
LTD_TEST_AWS_SECRET: ${{ secrets.LTD_TEST_AWS_SECRET }}
LTD_TEST_BUCKET: ${{ secrets.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"