Files
tai/.gitea/workflows/ci.yml
zphinx 6bcf839102
Some checks failed
CI / test (push) Failing after 0s
update pipeline
Co-authored-by: Copilot <copilot@github.com>
2026-05-04 03:47:32 +02:00

81 lines
2.1 KiB
YAML

name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Ensure git is available
run: |
if command -v git >/dev/null 2>&1; then
git --version
exit 0
fi
if command -v apt-get >/dev/null 2>&1; then
apt-get update
apt-get install -y git
elif command -v dnf >/dev/null 2>&1; then
dnf install -y git
elif command -v yum >/dev/null 2>&1; then
yum install -y git
else
echo "No supported package manager found to install git."
exit 1
fi
git --version
- name: Checkout source (native git)
run: |
if [ -n "${GITHUB_WORKSPACE:-}" ]; then
cd "$GITHUB_WORKSPACE"
fi
if [ ! -d .git ]; then
git init
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
fi
git fetch --depth 1 origin "$GITHUB_SHA"
git checkout --force FETCH_HEAD
- name: Ensure Python and pip are available
run: |
if command -v python3 >/dev/null 2>&1 && python3 -m pip --version >/dev/null 2>&1; then
python3 --version
exit 0
fi
if command -v apt-get >/dev/null 2>&1; then
apt-get update
apt-get install -y python3 python3-pip python3-venv
elif command -v dnf >/dev/null 2>&1; then
dnf install -y python3 python3-pip
elif command -v yum >/dev/null 2>&1; then
yum install -y python3 python3-pip
else
echo "No supported package manager found to install Python."
exit 1
fi
python3 --version
- name: Install package and dev dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -e .[dev]
- name: Lint
run: python3 -m ruff check .
- name: Type-check
run: python3 -m mypy src
- name: Test
run: python3 -m pytest