Bump pre-commit from 3.2.2 to 3.4.0 #300
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
# Copyright (c) 2022 Robert Bosch GmbH | |
# SPDX-License-Identifier: AGPL-3.0 | |
name: Continuous Integration | |
on: [pull_request, push, workflow_dispatch] | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ci: | |
name: CI | |
runs-on: ubuntu-latest | |
container: ubuntu:latest | |
steps: | |
- name: Install prerequisites | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
apt-get update | |
apt-get install --yes \ | |
curl \ | |
gcc \ | |
git \ | |
python3-dev \ | |
python3-venv | |
- name: Set up poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - --force | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: poetry install | |
- name: Configure git | |
run: | | |
git config --add --global safe.directory "$GITHUB_WORKSPACE" | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@bosch.com" | |
- name: Install & run pre-commit hooks | |
env: | |
SKIP: no-commit-to-branch | |
run: | | |
poetry run pre-commit install | |
poetry run pre-commit run --all-files --show-diff-on-failure | |
- name: Build and deploy docs | |
if: github.ref == 'refs/heads/main' | |
run: poetry run mkdocs gh-deploy |