-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (38 loc) · 1.07 KB
/
publish-mango.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
name: Upload mango
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip3 install -e .[test]
sudo apt update
sudo apt install --assume-yes mosquitto
sudo service mosquitto start
pip3 install pytest
pip3 install coverage
- name: Test+Coverage
run: |
source venv/bin/activate
coverage run --source ./mango -m pytest
coverage report
- name: Build package
run: |
source venv/bin/activate
python -m pip install build
python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}