Skip to content

Fix bugs of getting free port from remote SSH server. (#4) #4

Fix bugs of getting free port from remote SSH server. (#4)

Fix bugs of getting free port from remote SSH server. (#4) #4

Workflow file for this run

name: CI
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
pip install poetry==1.7.0
- name: Install dependencies
run: |
poetry install
- name: Run linting
run: |
poetry run black src/
- name: Run tests
run: |
poetry run pytest
- name: Run type checking
run: |
poetry run mypy src/
package:
runs-on: ubuntu-latest
needs: test
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Install Poetry
run: |
pip install poetry==1.7.0
- name: Install dependencies
run: |
poetry install
- name: Build package
run: |
poetry build
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: surena-package
path: dist/*
publish:
runs-on: ubuntu-latest
needs: package
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Install Poetry
run: |
pip install poetry==1.7.0
- name: Configure Poetry repositories
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: surena-package
path: dist/
- name: Publish package
run: poetry publish