This repository has been archived by the owner on May 22, 2024. It is now read-only.
Update README.md #383
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: YAPF Automated Formatting | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
automated-testing: | |
name: Automated Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
architecture: x64 | |
- name: Setup Poetry | |
run: | | |
curl -sL https://install.python-poetry.org | python | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
poetry config virtualenvs.in-project true | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
repository: ${{ github.repository }} | |
token: ${{ github.token }} | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: YAPF Code Formatter | |
run: poetry run python -m yapf --verbose -ir simplematrixbotlib tests examples | |
- name: Configure Git | |
run: | | |
git config user.name "YAPF Formatter" | |
git config user.email [email protected] | |
- name: Commit/Push Changes | |
run: | | |
git add * | |
git commit -m "Automated YAPF Formatting" | exit 0 | |
git push |