-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 895 Bytes
/
build.yml
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
# SPDX-FileCopyrightText: 2022 Alec Delaney
#
# SPDX-License-Identifier: MIT
name: Build CI
on: [pull_request, push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Set up latest Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Checkout repo
uses: actions/checkout@v3
- name: Install dev tools
run: |
pip install -r requirements-dev.txt
- name: Run pre-commit hooks
run: |
pre-commit run --all-files
- name: Build docs
working-directory: docs
run: sphinx-build -E -W -b html . _build/html
- name: Build Python package
run: |
pip install --upgrade build twine
find -type f -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) -exec sed -i -e "s/0.0.0+auto.0/1.2.3/" {} +
python -m build
twine check dist/*