Skip to content

Commit

Permalink
Migrate from travis to github actions (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
znerol authored Apr 3, 2021
1 parent 6392a23 commit d64f052
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 76 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: CI

# yamllint disable-line rule:truthy
on:
push:
branches:
- main
- develop
tags:
- v*
pull_request:
branches:
- main
- develop

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install pylint / pyflakes
run: sudo apt-get install --yes pylint pyflakes3

- name: Install pve_exporter
run: sudo pip install -e .

- name: Run pylint
run: pylint pve_exporter

- name: Run pyflakes
run: pyflakes3 src/pve_exporter
24 changes: 24 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Upload Python Package

# yamllint disable-line rule:truthy
on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: sudo apt-get install --yes python3-wheel twine

- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python3 setup.py sdist bdist_wheel
twine upload dist/*
73 changes: 0 additions & 73 deletions .travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ Grafana Dashboards

* `Proxmox via Prometheus by Pietro Saccardi`_


.. |Build Status| image:: https://travis-ci.com/prometheus-pve/prometheus-pve-exporter.svg?branch=master
:target: https://travis-ci.com/prometheus-pve/prometheus-pve-exporter
.. |Build Status| image:: https://github.com/prometheus-pve/prometheus-pve-exporter/actions/workflows/ci.yml/badge.svg
:target: https://github.com/prometheus-pve/prometheus-pve-exporter/actions/workflows/ci.yml
.. |Package Version| image:: https://img.shields.io/pypi/v/prometheus-pve-exporter.svg
:target: https://pypi.python.org/pypi/prometheus-pve-exporter
.. _wiki: https://github.com/prometheus-pve/prometheus-pve-exporter/wiki
Expand Down

0 comments on commit d64f052

Please sign in to comment.