31 lines
664 B
YAML
31 lines
664 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 $(git ls-files '*.py')
|
|
- name: Compile all Python files
|
|
run: |
|
|
python -m py_compile $(git ls-files '*.py')
|
|
- name: Run tests
|
|
run: |
|
|
pytest -q
|