31 lines
763 B
YAML

name: CI
on:
push:
branches: [ "master", "work" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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 pylint
- name: Lint with pylint
run: |
pylint --disable=all --enable=E,F --disable=import-error,possibly-used-before-assignment,no-self-argument $(git ls-files '*.py')
- name: Compile all Python files
run: |
python -m py_compile $(git ls-files '*.py')
- name: Run tests
run: |
pytest -q