2
1
mirror of https://github.com/deadc0de6/catcli synced 2024-11-15 18:14:01 +00:00

adding gh actions

This commit is contained in:
deadc0de6 2021-02-16 20:12:16 +01:00
parent ee1e3de79e
commit d019a2717c
3 changed files with 49 additions and 13 deletions

27
.github/workflows/pypi-release.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Release to PyPI
on:
release:
types: [created]
jobs:
pypi_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Tools
run: |
sudo apt update
sudo apt -y install python3-pypandoc pandoc
python -m pip install --upgrade pip
pip install setuptools wheel twine pypandoc
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build and Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

22
.github/workflows/testing.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.4, 3.5, 3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests-requirements.txt
pip install -r requirements.txt
- name: Run tests
run: |
./tests.sh

View File

@ -1,13 +0,0 @@
language: python
python:
- "3.4"
- "3.5"
- "3.6"
install:
- "pip install pip --upgrade"
- "pip install -r tests-requirements.txt"
- "pip install -r requirements.txt"
script:
./tests.sh
after_success:
coveralls