Skip to content

Enhance workflows and project structure #857

Enhance workflows and project structure

Enhance workflows and project structure #857

Workflow file for this run

---
# -----------------------------------------------------------------------------
# (C) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
# -----------------------------------------------------------------------------
# Lint/analyse code with Super-Linter.
name: Checks
on:
pull_request:
branches: [main]
push:
branches: [main, 'releases/**']
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
jobs:
check:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
max-parallel: 4
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.14"]
permissions:
contents: read
statuses: write
steps:
- name: Checkout current
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
fetch-depth: 0
- name: Super-Lint
uses: super-linter/super-linter/slim@d5b0a2ab116623730dd094f15ddc1b6b25bf7b99 # v8.3.2
env:
# Once the codebase is perfectly linted/formatted, switch to validating only changed files
# VALIDATE_ALL_CODEBASE: false # lint and format new or changed files only
FILTER_REGEX_EXCLUDE: (.*[.]conf.py|pull_request_template.md)
IGNORE_GITIGNORED_FILES: true
VALIDATE_BASH: true
VALIDATE_CHECKOV: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_GIT_LEAKS: true
VALIDATE_GIT_MERGE_CONFLICT_MARKERS: true
VALIDATE_JSON: true
VALIDATE_MARKDOWN: true
VALIDATE_NATURAL_LANGUAGE: true
VALIDATE_PERL: true
VALIDATE_PYTHON_RUFF_FORMAT: true
VALIDATE_PYTHON_RUFF: true
VALIDATE_YAML: true
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
...