Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command Line server #10

Merged
merged 16 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build-with-pip:
name: ${{ matrix.os }}-py${{ matrix.python-version }}${{ matrix.LABEL }}
runs-on: ${{ matrix.os }}
timeout-minutes: 5
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Run tests
run: |
pytest -n 2 --cov=. --cov-report=xml
pytest --cov=. --cov-report=xml

- name: Generate line coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Upload Python Package

on:
release:
types: [published]
workflow_dispatch:
workflow: "*"

jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build
run: |
python setup.py sdist bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: dist/*
name: artifacts
Publish:
needs: [Build]
name: Publish to PyPI
# Only run when the label 'Test Publish' is added to a PR
runs-on: Ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Download dist
uses: actions/[email protected]
with:
name: artifacts
path: dist
- name: Display downloaded files
run: |
ls -shR
working-directory: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
49 changes: 49 additions & 0 deletions .github/workflows/test-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test Upload Python Package

on:
workflow_dispatch:
workflow: "*"

jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build
run: |
python setup.py sdist bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: dist/*
name: artifacts
Publish:
needs: [Build]
name: Publish to TestPyPI
# Only run when dispatched manually
runs-on: Ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Download dist
uses: actions/[email protected]
with:
name: artifacts
path: dist
- name: Display downloaded files
run: |
ls -shR
working-directory: dist
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
Loading
Loading