fix dependencies #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Workflow for Push on Main Branch | |
on: | |
push: | |
tags: | |
- '**' | |
jobs: | |
pytest: | |
name: Run tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependecies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry pytest | |
poetry config virtualenvs.create false --local | |
poetry config virtualenvs.in-project false --local | |
poetry install | |
- name: Run tests | |
run: | | |
poetry run pytest | |
pytype: | |
name: Static type checking | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependecies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry pytype | |
poetry config virtualenvs.create false --local | |
poetry config virtualenvs.in-project false --local | |
poetry install | |
- name: Run type checking | |
run: | | |
poetry run pytype -V ${{ matrix.python-version }} | |
pylint: | |
name: Lint code | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependecies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry pylint | |
poetry config virtualenvs.create false --local | |
poetry config virtualenvs.in-project false --local | |
poetry install | |
- name: Run linting | |
run: | | |
poetry run pylint src/parasite | |
build: | |
name: Build package | |
needs: [pytest, pytype, pylint] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependecies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry config virtualenvs.create false --local | |
poetry config virtualenvs.in-project false --local | |
poetry install | |
- name: Build package | |
run: | | |
poetry build | |
- name: Upload package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tracing_py3-latest-py3 | |
path: dist/* | |
update-documentation: | |
name: Update documentation | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install dependecies | |
run: | | |
python -m pip install --upgrade pip | |
pip install make poetry | |
poetry config virtualenvs.create false --local | |
poetry config virtualenvs.in-project false --local | |
poetry install | |
- name: Build documentation | |
run: | | |
cd docs && make html | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.TOKEN }} | |
publish_dir: docs/build/html | |
force_orphan: true | |
publish-to-pypi: | |
name: Publish to PyPI | |
needs: build | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
name: tracing_py3-latest-py3 | |
path: dist | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
skip-existing: true | |