Skip to content

chore(deps): update pre-commit hook charliermarsh/ruff-pre-commit to v0.6.5 #2014

chore(deps): update pre-commit hook charliermarsh/ruff-pre-commit to v0.6.5

chore(deps): update pre-commit hook charliermarsh/ruff-pre-commit to v0.6.5 #2014

Workflow file for this run

name: build
on:
pull_request:
branches: [main]
env:
PYTHON_VERSION: "3.9"
jobs:
lint:
runs-on: ubuntu-latest
environment: CI
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
# The installation is required as mypy must be run in the local system environment, not in the pre-commit environment.
- name: Install required dependencies
run: |
python3 -m pip install --upgrade pip poetry
poetry config virtualenvs.create false
poetry install
- name: Linting and static code checks
run: |
pre-commit run --all-files
tests:
runs-on: ubuntu-latest
environment: CI
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
# Assume these are covered by 3.12
# - "3.10"
# - "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install core dependencies
run: |
python3 -m pip install --upgrade pip poetry
poetry config virtualenvs.create false
poetry install
- name: Test
env:
SETTINGS__COGNITE__CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
SETTINGS__COGNITE__CLIENT_ID: ${{ vars.CLIENT_ID }}
SETTINGS__COGNITE__PROJECT: ${{ vars.PROJECT }}
SETTINGS__COGNITE__CDF_CLUSTER: ${{ vars.CLUSTER }}
SETTINGS__COGNITE__TENANT_ID: ${{ vars.TENANT_ID }}
SETTINGS__COGNITE__LOGIN_FLOW: "client_credentials"
run: pytest --cov --cov-report term --cov-report xml:coverage.xml
- uses: codecov/codecov-action@v4
if: matrix.python-version == ${{ env.PYTHON_VERSION }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build package
run: poetry build
build-docs:
runs-on: ubuntu-latest
environment: CI
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Dependencies
run: |
python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .[docs]
- name: Build documentation
run: |
mkdocs build