Skip to content

Commit

Permalink
Add GH workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Jan 12, 2024
1 parent 474636c commit 9938d54
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/full_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test on Ubuntu

on:
pull_request:
branches: [master]
types: [synchronize, opened, reopened]


jobs:
build-and-test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest
- name: Pytest
run: |
pytest -v
29 changes: 29 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release to PyPI

on:
push:
tags:
- '*'
jobs:
release:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Tools
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Package and Upload
env:
STACKMANAGER_VERSION: ${{ github.event.release.tag_name }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m build --sdist --wheel
twine upload dist/*

0 comments on commit 9938d54

Please sign in to comment.