Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikboeck committed Jun 6, 2024
0 parents commit 3ea78f8
Show file tree
Hide file tree
Showing 29 changed files with 3,492 additions and 0 deletions.
182 changes: 182 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
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@v3
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@v3
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

114 changes: 114 additions & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: On pull request

on: [pull_request]

jobs:
pytest:
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:
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:
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:
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
Loading

0 comments on commit 3ea78f8

Please sign in to comment.