Files
my-botty/.github/workflows/ci.yml
T

56 lines
1.3 KiB
YAML

name: CI
on:
push:
branches: [main, stable]
pull_request:
branches: [main, stable]
# Cancel in-progress runs on new push
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: Tests (Windows)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-win11.txt
shell: bash
- name: Python version
run: python -c "import sys; print(sys.version)"
- name: Syntax check
env:
PYTHONPATH: ./src
run: python -m compileall -q src tools test scripts
- name: Tests with coverage
env:
PYTHONPATH: ./src
RUN_ENV: test
run: |
python -m coverage run -m pytest -v --tb=short
python -m coverage xml --ignore-errors || true
- name: Upload coverage
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: coverage.xml
retention-days: 7