Fix CI workflow - proper Gitea Actions syntax
This commit is contained in:
@@ -2,29 +2,52 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches: [main]
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
pip install pytest pytest-cov
|
||||
|
||||
- name: Run tests
|
||||
run: pytest tests/ -v --cov=man_card --cov-report=term-missing
|
||||
|
||||
- name: Check code quality
|
||||
run: |
|
||||
pip install ruff
|
||||
ruff check man_card/ tests/
|
||||
pytest tests/ -v --tb=short
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: |
|
||||
pytest tests/ --cov=man_card --cov-report=term-missing --cov-report=xml
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Check code formatting
|
||||
run: |
|
||||
pip install black ruff
|
||||
black --check man_card/
|
||||
ruff check man_card/
|
||||
Reference in New Issue
Block a user