Skip to content

Commit

Permalink
feat: moved to gh actions (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arfey committed Dec 26, 2021
1 parent 73098eb commit 55dc247
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

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

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install Python dependencies
run: pip install -r requirements-dev.txt

- name: Build package
run: |
python -m pep517.build --source --binary --out-dir dist .
echo > setup.py
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
pull_request:
branches:
- master

jobs:
run-test:
name: Run test
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'

- name: Install Python dependencies
run: pip install -r requirements-dev.txt

- name: run tests
run: make test

0 comments on commit 55dc247

Please sign in to comment.