Files
repohealth-cli/.gitea/workflows/repohealth.yml
Developer 5b74fccad8
Some checks failed
CI / lint (push) Successful in 9m27s
CI / test (push) Failing after 4m46s
CI / build (push) Has been skipped
fix: update CI workflow with proper checkout paths
2026-02-05 18:03:00 +00:00

96 lines
2.2 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
timeout: 300
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: repohealth-cli
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff
working-directory: ./repohealth-cli
- name: Run linting
run: python -m ruff check src/ tests/
working-directory: ./repohealth-cli
test:
runs-on: ubuntu-latest
timeout: 600
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: repohealth-cli
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pytest pytest-cov
working-directory: ./repohealth-cli
- name: Run tests
run: python -m pytest tests/ -xvs --tb=short
working-directory: ./repohealth-cli
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: .coverage
working-directory: ./repohealth-cli
build:
runs-on: ubuntu-latest
timeout: 300
needs: [lint, test]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: repohealth-cli
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install build
working-directory: ./repohealth-cli
- name: Build package
run: python -m build
working-directory: ./repohealth-cli