Files
ess-helm/.github/workflows/scripts-linting.yml
T
2025-02-19 15:49:10 +01:00

55 lines
1.1 KiB
YAML

# Copyright 2024 New Vector Ltd
#
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
name: Scripts linting
on:
pull_request_target:
push:
branches:
- main
workflow_dispatch:
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run ShellCheck
run: shellcheck scripts/*.sh
python:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: matrix-org/setup-python-poetry@gaelg/poetry-venv
with:
poetry-version: "1.8.5"
python-version: "3.x"
- name: Load poetry path
run: |
echo "$(poetry env info -p)/bin" >> "${GITHUB_PATH}"
- name: Run ruff check
run: |
ruff check
- name: Run ruff format
run: |
ruff format --check
- name: pytest scripts
run: |
pytest --version
pytest scripts