pull 7 #87
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.10.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10.8' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install black mypy pylint pygame pyfakefs pandas boddle sqlalchemy requests bs4 gspread telebot responses httpretty community vk_api | |
- 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 }} |