Skip to content

Merge pull request #10 from ELMOURABEA/copilot/release-update-version… #10

Merge pull request #10 from ELMOURABEA/copilot/release-update-version…

Merge pull request #10 from ELMOURABEA/copilot/release-update-version… #10

Workflow file for this run

name: Tests
on:
push:
branches: [ main, main/coll, develop ]
pull_request:
branches: [ main, main/coll ]
permissions:
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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 -r requirements.txt
pip install -e .
- name: Run tests
run: |
pytest -v --tb=short
- name: Test CLI demo (Unix)
if: runner.os != 'Windows'
run: |
timeout 10 python main.py || true
- name: Test CLI demo (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$job = Start-Job -ScriptBlock { python main.py }
Wait-Job $job -Timeout 10 | Out-Null
Stop-Job $job
Remove-Job $job
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pylint
pip install -r requirements.txt
pip install -e .
- name: Lint with flake8
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 megabot --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings
flake8 megabot --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
continue-on-error: true