*: migrate from yapf to ruff #54
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: CI | |
on: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- '**' | |
paths: | |
- '.github/workflows/CI.yml' | |
- 'python_weather/**/*.py' | |
pull_request: null | |
jobs: | |
ci: | |
name: Run tests and pretty files | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
architecture: x64 | |
- name: Install dependencies | |
run: python3 -m pip install . | |
- name: Run test | |
run: python3 test.py | |
- name: Install yapf | |
run: | | |
python3 -m pip install toml | |
python3 -m pip install ruff | |
- name: Lint and pretty files | |
run: | | |
python3 -m ruff check | |
python3 -m ruff format | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: 'style: prettier' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |