-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (68 loc) · 1.99 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
89
name: CI
"on": [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # full history for setuptools_scm
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v3
name: Use Node.js
with:
node-version-file: ".nvmrc"
- name: NPM install
run: |
npm install -g gulp-cli
npm install
- name: What pandoc
run: which pandoc | true
- name: Python install
run: |
python -m pip install --upgrade pip
pip install .[dev]
pip install tox
- name: What pandoc
run: which pandoc | true
- name: Build assets
run: gulp assets --env=deploy
- name: Download Pandoc
run: |
downloadUrl="https://github.com/jgm/pandoc/releases/download/2.19.2/pandoc-2.19.2-1-amd64.deb"
wget --no-verbose "$downloadUrl"
sudo dpkg -i "${downloadUrl##*/}"
pandoc --version
- name: Run tests
run: tox -e py,lint # ,typing
- name: What pandoc
run: which pandoc | true
pypi:
runs-on: ubuntu-latest
needs: [test]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # full history for setuptools_scm
- uses: actions/setup-node@v3
name: Use Node.js
with:
node-version-file: ".nvmrc"
- name: NPM install
run: |
npm install -g gulp-cli
npm install
- name: Build assets
run: gulp assets --env=deploy
- name: Build and publish
uses: lsst-sqre/build-and-publish-to-pypi@v1
with:
pypi-token: ${{ secrets.PYPI_SQRE_ADMIN }}
python-version: "3.11"