-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (43 loc) · 1.31 KB
/
release.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
34
35
36
37
38
39
40
41
42
43
44
45
46
name: release-pipeline
on:
release:
types:
- created
jobs:
release-job:
runs-on: ubuntu-latest
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install -e .
pip install flake8 pytest pytest-cov twine wheel
- name: Test with pytest
run: |
pytest --cov=./calibr8 --cov-append --cov-report xml --cov-report term-missing calibr8
- name: Install and test with PyMC v5
run: |
pip install "pymc>=5.0.0"
pytest --cov=./calibr8 --cov-append --cov-report xml --cov-report term-missing calibr8
- name: Build package
run: |
python setup.py sdist bdist_wheel
- name: Check version number match
run: |
echo "GITHUB_REF: ${GITHUB_REF}"
# Make sure the package version is the same as the tag
grep -Rq "^Version: ${GITHUB_REF:11}$" calibr8.egg-info/PKG-INFO
- name: Publish to PyPI
run: |
twine check dist/*
twine upload --repository pypi --username __token__ --password ${PYPI_TOKEN} dist/*
- name: Test installation
run: |
sleep 120
pip install calibr8==${GITHUB_REF:11}