Skip to content

Merge pull request #59 from VERITAS-Observatory/dependabot/github_act… #204

Merge pull request #59 from VERITAS-Observatory/dependabot/github_act…

Merge pull request #59 from VERITAS-Observatory/dependabot/github_act… #204

Workflow file for this run

---
name: CI-linting
on:
workflow_dispatch:
pull_request:
branches: [main]
types: [opened, synchronize]
push:
branches:
- main
jobs:
linting:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -leo pipefail {0}
permissions:
contents: read
packages: read
statuses: write
steps:
- name: checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Check for non-ASCII characters
run: |
output=$(find . -type f \
\( -name "*.py" -o -name "*.rst" -o -name "*.yml" -o -name "*.toml" \) \
-exec perl -ne 'print if /[^[:ascii:]]/ && !/latin/i' {} \;)
if [ -n "$output" ]; then
echo "Non-ASCII characters found in documentation."
exit 1
fi
- name: install packages not included in super-linter
run: |
pip install validate-pyproject
- name: pyproject.toml
run: |
validate-pyproject pyproject.toml
- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/cffconvert-github-action@2.0.0
with:
args: "--validate"
# Dependencies required to avoid errors
# reported by linters
- name: Install mamba dependencies
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
init-shell: bash
- name: Python dependencies
run: |
pip install -e '.[tests,dev,doc]'
- name: Pre-commit
run: |
pre-commit run --all-files
- name: Lint Code Base
uses: super-linter/super-linter@v8
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_YAML: true
VALIDATE_NATURAL_LANGUAGE: true
VALIDATE_DOCKERFILE_HADOLINT: true
VALIDATE_BASH: true
LINTER_RULES_PATH: ./
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}