chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.1.14 #199
Workflow file for this run
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: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
linting: | |
name: "Linting and formatting checks" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "actions/setup-python@v5" | |
with: | |
python-version: "3.11" | |
- name: "Install dependencies" | |
run: | | |
python -m pip install --upgrade pip poetry | |
poetry install | |
- name: "Run black" | |
run: | | |
poetry run pre-commit run black --all-files | |
- name: "Run ruff" | |
uses: chartboost/ruff-action@v1 | |
tests: | |
name: "Python ${{ matrix.python-version}} on ${{ matrix.os }}" | |
needs: linting | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11"] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "actions/setup-python@v5" | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: "Install dependencies" | |
run: | | |
python -m pip install --upgrade pip poetry | |
poetry install | |
- name: "Run tests" | |
run: | | |
poetry run pytest --cov aioelectricitymaps --cov-report xml | |
- name: "Upload coverage to Codecov" | |
uses: "codecov/codecov-action@v3" | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |