Skip to content

Commit

Permalink
Added workflow files.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcschrg committed Oct 19, 2023
1 parent 52a6168 commit 4dfc7bb
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish-mango.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Upload mango

on:
release:
types: [published]

jobs:
deploy:
runs-on: python:3.8.10
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip3 install -r requirements.txt
pip3 install -e .
apt update
apt install --assume-yes mosquitto
service mosquitto start
pip3 install pytest
pip3 install coverage
- name: Test+Coverage
run: |
coverage run --source ./mango -m pytest
coverage report
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/test-mango.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test mango

on: [push]

permissions:
contents: read

jobs:
build:
runs-on: python:3.8.10

steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip3 install -r requirements.txt
pip3 install -e .
apt update
apt install --assume-yes mosquitto
service mosquitto start
pip3 install pytest
pip3 install coverage
- name: Test+Coverage
run: |
coverage run --source ./mango -m pytest
coverage report

0 comments on commit 4dfc7bb

Please sign in to comment.