Skip to content

chore: add windows specific packages back #29

chore: add windows specific packages back

chore: add windows specific packages back #29

name: python-codestyle
on:
pull_request:
types: [assigned, edited, opened, synchronize, reopened]
jobs:
verify-commits:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install pycodestype
run: |
python -m pip install --upgrade pip
pip install pycodestyle
which pycodestyle
- name: Check Python code style
run: |
echo "base ref: $GITHUB_BASE_REF"
git checkout $GITHUB_BASE_REF
echo "head ref: $GITHUB_HEAD_REF"
git checkout $GITHUB_HEAD_REF
git --no-pager diff $GITHUB_BASE_REF $GITHUB_HEAD_REF --name-only |grep ".py$" || { echo "No change on Python code"; exit 0; }
git --no-pager diff $GITHUB_BASE_REF $GITHUB_HEAD_REF --name-only |grep ".py$" |xargs pycodestyle --show-source --config=.pycodestyle