Skip to content
This repository was archived by the owner on Dec 20, 2025. It is now read-only.

Initial commit

Initial commit #1

Workflow file for this run

name: CI
on:
push:
branches: [master, develop]
tags:
- "v*.*.*"
pull_request:
branches: [master, develop]
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Show environment info
run: |
python --version
pip list
- name: Lint with flake8
run: |
flake8 yaegi --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 yaegi --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
- name: Format code with black
run: |
black yaegi
- name: Commit and push Black changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: auto-format code with Black" || echo "No changes to commit"
git pull --rebase origin ${{ github.ref }}
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} HEAD:${{ github.ref }}
- name: Type check with mypy (soft fail)
run: |
mypy yaegi || true
- name: Test with pytest
run: |
pytest --cov=yaegi --cov-report=xml
timeout-minutes: 5
- name: Upload coverage to Codecov (non-blocking)
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: |
python -m build
- name: Check package
run: |
twine check dist/*
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
publish:
if: startsWith(github.ref, 'refs/tags/')
needs: [test, build]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}