Skip to content

Bump ruff from 0.3.7 to 0.4.2 #163

Bump ruff from 0.3.7 to 0.4.2

Bump ruff from 0.3.7 to 0.4.2 #163

Workflow file for this run

name: tests
on:
push:
branches:
- master
pull_request_target:
schedule:
- cron: "42 7 * * 0" # Every Sunday morning when I am fast asleep :)
# This is useful for keeping the cache fit and ready
workflow_dispatch:
env:
POETRY_VERSION: "1.7.0"
jobs:
deploy:
runs-on: ubuntu-latest # ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
env:
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- run: |
git fetch --prune --unshallow --tags
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Update full Python version
- name: Full Python version
run: |
echo "PYTHON_VERSION=$(python -c "import platform; print(platform.python_version())")"
echo "PYTHON_VERSION=$(python -c "import platform; print(platform.python_version())")" >> $GITHUB_ENV
# virtualenv cache should depends on OS, Python version and `poetry.lock` (and optionally workflow files).
- name: Cache Packages
uses: actions/cache@v4
with:
path: |
~/.local
.venv
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}
- name: Install and configure Poetry
uses: snok/[email protected]
with:
version: ${{ env.POETRY_VERSION }}
virtualenvs-create: true
virtualenvs-in-project: true
- name: Display Python version
run: poetry run python -c "import sys; print(sys.version)"
- name: Cache folder for data
uses: actions/cache@v4
id: cache-folder
with:
path: |
~/.cache/opensky/
key: opensky-${{ runner.os }}
- name: Install dependencies
run: |
poetry install
- name: Style checking
run: |
poetry run ruff check src tests
poetry run ruff format --check src tests
- name: Type checking
run: |
poetry run mypy src tests
- name: Run tests
env:
OPENSKY_USERNAME: ${{ secrets.OPENSKY_USERNAME }}
OPENSKY_PASSWORD: ${{ secrets.OPENSKY_PASSWORD }}
run: |
poetry run pytest