Skip to content

0.4.1

0.4.1 #99

Workflow file for this run

name: Unit Tests
# only run on pushes to main or pull requests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
# Continuous-Integration:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, macos-latest]
# python-version: ["3.12"]
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install poetry
# uses: snok/install-poetry@v1
# - name: Install package
# run: poetry install
# - name: Test with pytest
# run: poetry run pytest
# - name: Use Codecov to track coverage
# uses: codecov/codecov-action@v2
# with:
# file: ./coverage.xml
# - name: Build documentation
# run: poetry run make html --directory docs/
# needs: Continuous-Integration
deploy:
if: github.ref == 'refs/heads/main' # github.event_name == 'push' &&
# Set up operating system
runs-on: ubuntu-latest
# Define job steps
steps:
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Check-out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install poetry
uses: snok/install-poetry@v1
- name: Install package
run: poetry install
# This action uses Python Semantic Release v8
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@v8.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Python Semantic Release to prepare release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
poetry run semantic-release publish
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Test install from TestPyPI
run: |
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
nbiatoolkit
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: jjjermiah
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish documentation
uses: maxheld83/ghpages@v0.2.1
with:
build_dir: docs/_build/html
target_branch: gh-pages
committer_name: "GitHub Actions"
committer_email: "jermiahjoseph98@gmail.com"