Skip to content

CM-61023: update pinned actions (#414) #1982

CM-61023: update pinned actions (#414)

CM-61023: update pinned actions (#414) #1982

Workflow file for this run

name: Ruff (linter and code formatter)
on: [ pull_request, push ]
permissions:
contents: read
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- name: Run Cimon
uses: cycodelabs/cimon-action@1c3e30d508634b3f4a60b02843126c9f93944d80 # v0.9.4
with:
client-id: ${{ secrets.CIMON_CLIENT_ID }}
secret: ${{ secrets.CIMON_SECRET }}
prevent: true
allowed-hosts: >
files.pythonhosted.org
install.python-poetry.org
pypi.org
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.9
- name: Load cached Poetry setup
id: cached-poetry
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.local
key: poetry-ubuntu-1 # increment to reset cache
- name: Setup Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1.4.1
with:
version: 2.2.1
- name: Add Poetry to PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install
- name: Run linter check
run: poetry run ruff check --output-format=github .
- name: Run code style check
run: poetry run ruff format --check .