Homework02 Плешнев Арсений 467106 К24 1.2 #929
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CS102 Workflow | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.12.6 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.12.6' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install isort black pylint mypy | |
- name: Install project dependencies | |
run: | | |
if [ -f ${{ github.head_ref }}/requirements.txt ]; | |
then | |
pip install -r ${{ github.head_ref }}/requirements.txt | |
fi | |
- name: Run isort | |
run: | | |
isort -c --diff --profile black ${{ github.head_ref }} | |
- name: Run black | |
run: | | |
black -l 120 --check --diff --color --exclude "test*" ${{ github.head_ref }} | |
- name: Run mypy | |
run: | | |
mypy --ignore-missing-imports ${{ github.head_ref }} | |
- name: Run pylint | |
run: | | |
pylint --disable=missing-docstring --variable-rgx="[a-z0-9_]{1,30}$" --argument-rgx="^[a-z][a-z0-9]*((_[a-z0-9]+)*)?$" --ignore-patterns="test_.*?py" --exit-zero ${{ github.head_ref }} | |
- name: Run unittests | |
run: | | |
python -m unittest discover ${{ github.head_ref }} |