Skip to content

ci: remove test pypi workflow #43

ci: remove test pypi workflow

ci: remove test pypi workflow #43

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
env:
PYTHON_VERSION: '3.10'
POETRY_VERSION: '1.8.2'
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache Poetry Install
id: cache-poetry
uses: actions/cache@v4
with:
path: |
/opt/poetry
~/.cache/pypoetry
.venv
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('**/pyproject.toml') }}
- name: Install Poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
export POETRY_HOME=/opt/poetry
python3 -m venv $POETRY_HOME
$POETRY_HOME/bin/pip install poetry==1.8.2
$POETRY_HOME/bin/poetry --version
- name: Add Poetry to PATH
run: echo "/opt/poetry/bin" >> $GITHUB_PATH
- name: Install dev dependencies
id: install
run: poetry install # Install all dependencies including dev
- name: Ruff Lint
if: steps.install.outcome == 'success'
id: ruff-lint
run: |
poetry run ruff check > ruff-lint.log
ruff_check_exit_code=$?
cat ruff-lint.log
exit $ruff_check_exit_code
- name: Ruff Format
if: always() && steps.install.outcome == 'success'
id: ruff-format
run: |
set -o pipefail
poetry run ruff format --check 2>&1 | tee ruff-format.log
- name: Post Summary
if: always()
run: |
echo "### Ruff Lint Results" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
LINT_LOG=$(cat ruff-lint.log || echo "No lint log found.")
echo "$LINT_LOG" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "### Ruff Format Results" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
FORMAT_LOG=$(cat ruff-format.log || echo "No format log found.")
echo "$FORMAT_LOG" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache Poetry Install
id: cache-poetry
uses: actions/cache@v4
with:
path: |
/opt/poetry
~/.cache/pypoetry
.venv
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('**/pyproject.toml') }}
- name: Install Poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
export POETRY_HOME=/opt/poetry
python3 -m venv $POETRY_HOME
$POETRY_HOME/bin/pip install poetry==1.8.2
$POETRY_HOME/bin/poetry --version
- name: Add Poetry to PATH
run: echo "/opt/poetry/bin" >> $GITHUB_PATH
- name: Install dependencies
id: install
run: poetry install # Install all dependencies including dev
- name: Run Pytest
if: steps.install.outcome == 'success'
run: |
set -o pipefail
poetry run pytest --maxfail=5 --disable-warnings 2>&1 | tee pytest.log
- name: Post Summary
if: always()
run: |
echo "### Pytest Results" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
TEST_LOG=$(cat pytest.log || echo "No test log found.")
echo "$TEST_LOG" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
integrations-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache Poetry Install
id: cache-poetry
uses: actions/cache@v4
with:
path: |
/opt/poetry
~/.cache/pypoetry
.venv
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('**/pyproject.toml') }}
- name: Install Poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
export POETRY_HOME=/opt/poetry
python3 -m venv $POETRY_HOME
$POETRY_HOME/bin/pip install poetry==1.8.2
$POETRY_HOME/bin/poetry --version
- name: Add Poetry to PATH
run: echo "/opt/poetry/bin" >> $GITHUB_PATH
- name: Run Poetry Lock
run: poetry lock
- name: Install dependencies
id: install
run: poetry install # Install all dependencies including dev
- name: Run Comeit
if: steps.install.outcome == 'success'
run: |
set -o pipefail
poetry run comeit 2>&1 | tee comeit.log
- name: Post Summary
if: always()
run: |
echo "### Comeit Results" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
COMEIT_LOG=$(cat comeit.log || echo "No comeit log found.")
echo "$COMEIT_LOG" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY